/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Otimizações de performance */
html {
    scroll-behavior: smooth;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(79, 109, 238, 0.8) 100%), url('public/fundo_apresentacao_eleeva.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

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

.calculator-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #4686daf8 100%);
    color: white;
    padding: 30px;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    height: 50px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
    filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.header-text h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.header-text p {
    opacity: 0.9;
    font-size: 1rem;
}

/* Content */
.content {
    padding: 30px;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
}

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

.form-group select,
.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.info-text {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #6b7280;
}

.info-text i {
    color: #667eea;
}

.update-badge {
    margin-left: 10px;
    padding: 4px 8px;
    background: linear-gradient(135deg, #667eea, #567af1);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Inputs Grid */
.inputs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Results Section */
.results-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid #bae6fd;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.results-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.results-header i {
    color: #0ea5e9;
    font-size: 1.2rem;
}

.results-header h2 {
    color: #374151;
    font-size: 1.3rem;
    font-weight: 600;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 20px;
}

.result-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.result-card h3 {
    color: #374151;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f3f4f6;
}

.cost-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.cost-item span:first-child {
    color: #6b7280;
}

.cost-item span:last-child {
    font-weight: 600;
    color: #374151;
}

.cost-item.total {
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
    font-weight: 600;
}

.cost-item.total span:last-child {
    color: #667eea;
    font-size: 1rem;
}

.cost-item.brl span:last-child {
    color: #059669;
    font-weight: 700;
}

.cost-item.brl-highlight {
    background: #dcfce7;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
}

.cost-item.brl-highlight span:first-child {
    color: #166534;
}

.cost-item.brl-highlight span:last-child {
    color: #059669;
    font-size: 1.1rem;
}

.cost-item.brl-margin {
    background: #fef3c7;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    border: 2px solid #f59e0b;
}

.cost-item.brl-margin span:first-child {
    color: #92400e;
}

.cost-item.brl-margin span:last-child {
    color: #d97706;
    font-size: 1.1rem;
}

/* Additional Info */
.additional-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    padding-top: 20px;
    border-top: 2px solid #bae6fd;
}

.info-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #6b7280;
}

.info-item span:last-child {
    font-weight: 600;
    color: #374151;
}

/* Guide Section */
.guide-section {
    background: #fef3c7;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid #fcd34d;
}

.guide-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #92400e;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.guide-section h3 i {
    color: #f59e0b;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.guide-column h4 {
    color: #374151;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.guide-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.guide-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.guide-item span:first-child {
    color: #6b7280;
}

.guide-item span:last-child {
    font-weight: 600;
    color: #374151;
}

.tip-box {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border-left: 4px solid #f59e0b;
}

.tip-box p {
    font-size: 0.9rem;
    color: #6b7280;
}

.tip-box code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #374151;
    margin-left: 5px;
}

/* Token Calculator */
.token-calculator {
    background: #eff6ff;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid #93c5fd;
}

.token-calculator h3 {
    color: #1e40af;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.calculator-input label,
.calculator-result label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.calculator-input textarea {
    width: 100%;
    height: 120px;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: none;
    transition: all 0.3s ease;
}

.calculator-input textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.result-display {
    width: 100%;
    height: 120px;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.token-result-content {
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
}

.token-result-content.has-result {
    color: #374151;
}

.token-result-content .result-stats {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.token-result-content .token-count {
    font-size: 1.2rem;
    font-weight: 700;
    color: #667eea;
}

/* Scale Section */
.scale-section {
    background: #f9fafb;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.scale-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #374151;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.scale-section h3 i {
    color: #059669;
}

.scale-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.scale-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.scale-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.scale-card .requests {
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.scale-card .usd-cost {
    font-size: 0.9rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 5px;
}

.scale-card .brl-cost {
    font-size: 1.1rem;
    font-weight: 700;
    color: #059669;
    margin-bottom: 8px;
}

.scale-card .tokens {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .header {
        padding: 20px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .logo {
        height: 40px;
    }
    
    .header-text h1 {
        font-size: 1.5rem;
    }
    
    .content {
        padding: 20px;
    }
    
    .inputs-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .guide-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .calculator-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .scale-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .additional-info {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .scale-grid {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .cost-item {
        font-size: 0.8rem;
    }
    
    .guide-item {
        font-size: 0.8rem;
    }
}

/* Animações de entrada */
.form-group {
    animation: fadeInLeft 0.6s ease-out;
    animation-fill-mode: both;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hover effects */
.result-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* Loading animation */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #667eea;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

/* Budget Calculator */
.budget-calculator {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 2px solid #0ea5e9;
}

.budget-calculator h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0c4a6e;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.budget-calculator h3 i {
    color: #0ea5e9;
}

.budget-description {
    color: #475569;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.budget-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.budget-input {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.budget-result {
    position: relative;
    min-height: 200px;
}

.budget-results-content {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #e2e8f0;
}

.budget-summary h4 {
    color: #1e293b;
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-align: center;
}

.budget-summary h4 span {
    color: #0ea5e9;
    font-weight: 700;
}

.token-breakdown {
    margin-bottom: 25px;
}

.token-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.token-item.total-tokens {
    border-top: 2px solid #e2e8f0;
    padding-top: 12px;
    margin-top: 8px;
    font-weight: 600;
}

.token-label {
    color: #64748b;
    font-size: 0.9rem;
}

.token-value {
    color: #1e293b;
    font-weight: 600;
    font-size: 1rem;
}

.total-tokens .token-value {
    color: #0ea5e9;
    font-size: 1.1rem;
}

.budget-scenarios h5 {
    color: #374151;
    font-size: 1rem;
    margin-bottom: 15px;
    text-align: center;
}

.scenario-grid {
    display: grid;
    gap: 10px;
}

.scenario-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    padding: 10px 15px;
    border-radius: 8px;
    border-left: 4px solid #0ea5e9;
}

.scenario-label {
    color: #475569;
    font-size: 0.9rem;
}

.scenario-value {
    color: #0ea5e9;
    font-weight: 600;
    font-size: 0.95rem;
}

.budget-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
    background: white;
    border-radius: 12px;
    border: 2px dashed #cbd5e1;
    color: #64748b;
    text-align: center;
    padding: 20px;
}

.budget-placeholder i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #94a3b8;
}

.budget-placeholder p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Mode Toggle */
.mode-toggle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px 30px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.toggle-input {
    position: relative;
    width: 60px;
    height: 30px;
    appearance: none;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.toggle-input:checked {
    background: #10b981;
}

.toggle-input::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-input:checked::before {
    transform: translateX(30px);
}

.toggle-text {
    font-size: 1rem;
    font-weight: 600;
}

.client-link {
    display: flex;
    align-items: center;
}

.client-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.client-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
}

.client-button i {
    font-size: 0.8rem;
}

/* Commercial Dashboard */
.commercial-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 20px;
    padding: 30px;
    margin-top: 30px;
    border: 2px solid #cbd5e1;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

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

.commercial-header h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #1e293b;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.commercial-header i {
    color: #3b82f6;
    font-size: 1.6rem;
}

.commercial-subtitle {
    color: #64748b;
    font-size: 1.1rem;
    margin: 0;
}

/* Scenarios Section */
.scenarios-section {
    margin-bottom: 40px;
}

.scenarios-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #374151;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 25px;
}

.scenarios-section h3 i {
    color: #8b5cf6;
}

.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.scenario-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.scenario-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
}

.scenario-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #3b82f6;
}

.scenario-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 15px;
    text-align: center;
}

.scenario-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.scenario-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.scenario-detail:last-child {
    border-bottom: none;
    font-weight: 700;
    color: #059669;
    font-size: 1.1rem;
}

.scenario-label {
    color: #64748b;
    font-size: 0.9rem;
}

.scenario-value {
    color: #1e293b;
    font-weight: 600;
}

/* Charts Section */
.charts-section {
    margin-bottom: 40px;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

.chart-container {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.chart-container h4 {
    color: #374151;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
}

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

/* Executive Summary */
.executive-summary h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #374151;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 25px;
}

.executive-summary h3 i {
    color: #059669;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.summary-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #3b82f6;
}

.summary-card.highlight {
    border-left-color: #059669;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
}

.summary-card h4 {
    color: #374151;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-card .value {
    color: #1e293b;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.summary-card.highlight .value {
    color: #059669;
}

.summary-card .description {
    color: #64748b;
    font-size: 0.85rem;
}

/* Presentation Mode Styles */
.presentation-mode .cost-item.brl,
.presentation-mode .cost-item.brl-highlight,
.presentation-mode .cost-item.brl-margin {
    display: none;
}

.presentation-mode .cost-item.total span:last-child {
    display: none;
}

.presentation-mode .cost-item.total::after {
    content: 'Consulte nossa equipe comercial';
    color: #3b82f6;
    font-weight: 600;
    font-style: italic;
}

.presentation-mode #pricing-info {
    display: none;
}

.presentation-mode .form-group:has(#margin-select) {
    display: none;
}

.presentation-mode .additional-info {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .budget-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .budget-calculator {
        padding: 20px;
    }
    
    .scenario-grid {
        gap: 8px;
    }
    
    .scenario-item {
        padding: 8px 12px;
    }
}
