/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Screen Reader Only - Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* === LANGUAGE SWITCHER === */
.language-switcher {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    z-index: 1000;
}

.lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    padding: 8px;
}

.flag-icon {
    width: 32px;
    height: 32px;
    display: block;
    flex-shrink: 0;
}

.lang-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 1);
}

.lang-btn.active {
    border-color: #fbbf24;
    border-width: 4px;
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.6), 0 0 0 2px rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
}

.lang-btn.active::after {
    content: '✓';
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    font-size: 11px;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .language-switcher {
        gap: 0.4rem;
        margin-bottom: 1rem;
    }
    
    .lang-btn {
        width: 48px;
        height: 48px;
        padding: 8px;
        border-width: 2px;
    }
    
    .lang-btn.active::after {
        width: 14px;
        height: 14px;
        font-size: 9px;
    }
    
    .flag-icon {
        width: 32px;
        height: 32px;
    }
    
    /* Share buttons - linha horizontal como desktop */
    .share-buttons-grid {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto;
        gap: 0.5rem;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .share-btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
        flex-direction: row;
        gap: 0.5rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .share-btn svg {
        width: 18px;
        height: 18px;
    }
}

:root {
    --purple-50: #faf5ff;
    --purple-100: #f3e8ff;
    --purple-200: #e9d5ff;
    --purple-300: #d8b4fe;
    --purple-400: #c084fc;
    --purple-500: #a855f7;
    --purple-600: #9333ea;
    --purple-700: #7e22ce;
    --purple-800: #6b21a8;
    --purple-900: #581c87;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background: linear-gradient(135deg, var(--purple-50) 0%, var(--purple-100) 100%);
    min-height: 100vh;
}

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

/* Header */
header {
    background: linear-gradient(135deg, var(--purple-800) 0%, var(--purple-900) 100%);
    color: white;
    padding: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: relative; /* For language switcher positioning */
}

header .container {
    position: relative; /* For language switcher positioning */
}

/* Ticker de Cotações */
.cotacoes-ticker {
    background: #2d1b4e;
    padding: 0.5rem 0;
    overflow: hidden;
    border-bottom: 2px solid rgba(168, 85, 247, 0.3);
}

.ticker-wrapper {
    width: 100%;
    overflow: hidden;
}

.ticker-content {
    display: flex;
    animation: scroll 40s linear infinite;
    white-space: nowrap;
    will-change: transform;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-33.33%);
    }
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    padding: 0 2rem;
    font-size: 0.875rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.ticker-simbolo {
    font-weight: 700;
    color: #fcd34d;
    margin-right: 0.5rem;
}

.ticker-valor {
    font-weight: 600;
    color: white;
    margin-right: 0.5rem;
}

.ticker-variacao {
    font-weight: 600;
    font-size: 0.8rem;
}

.ticker-variacao.positivo {
    color: #6ee7b7;
}

.ticker-variacao.negativo {
    color: #fca5a5;
}

header .container {
    padding: 3rem 1.5rem;
    text-align: center;
}

header h1 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

@media (max-width: 768px) {
    header h1 {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }
}

.subtitle {
    font-size: clamp(1rem, 3vw, 1.25rem);
    opacity: 0.95;
    font-weight: 400;
    margin-bottom: 0.75rem;
}

.contato-header {
    font-size: clamp(0.875rem, 2vw, 1rem);
    opacity: 0.9;
    font-weight: 400;
    margin-top: 1rem;
}

.contato-header a {
    color: white;
    text-decoration: underline;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.contato-header a:hover {
    opacity: 0.8;
}

/* Main Content */
main {
    padding: 3rem 0;
}

/* Calculator Section */
.calculator-section {
    margin-bottom: 3rem;
    margin-top: 3rem;
}

.calculator-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 25px -5px rgba(139, 92, 246, 0.1), 0 8px 10px -6px rgba(139, 92, 246, 0.1);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--gray-200);
    overflow-x: auto;
}

.tab-btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-600);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--purple-600);
    background: var(--purple-50);
}

.tab-btn.active {
    color: var(--purple-700);
    border-bottom-color: var(--purple-600);
}

.tab-content {
    display: none;
}

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

/* Form */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
}

.label-text {
    font-size: 0.875rem;
}

/* Input com Slider */
.input-slider-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-wrapper,
.input-wrapper-small {
    display: flex;
    align-items: center;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
}

.input-wrapper:focus-within,
.input-wrapper-small:focus-within {
    border-color: var(--purple-500);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.input-wrapper {
    gap: 0.5rem;
}

.input-wrapper-small {
    gap: 0.5rem;
}

.input-prefix,
.input-suffix {
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.875rem;
}

.input-text {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-800);
    outline: none;
    min-width: 0;
}

.input-wrapper-small .input-text {
    width: 60px;
    text-align: right;
}

.select-periodo {
    padding: 0.25rem 0.5rem;
    border: none;
    background: var(--gray-200);
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    outline: none;
    text-transform: uppercase;
}

.select-periodo:focus {
    background: var(--purple-100);
    color: var(--purple-700);
}

input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: var(--gray-200);
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--purple-600);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--purple-700);
    transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--purple-600);
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb:hover {
    background: var(--purple-700);
    transform: scale(1.1);
}

/* Button */
.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 700;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    color: white;
    background: linear-gradient(135deg, var(--purple-700) 0%, var(--purple-800) 100%);
    box-shadow: 0 4px 6px -1px rgba(107, 33, 168, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(107, 33, 168, 0.5);
}

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

.btn-secondary {
    color: var(--gray-700);
    background: white;
    border: 2px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

/* Resultado */
.resultado {
    margin-top: 3rem;
    animation: fadeIn 0.5s ease;
}

/* Share Buttons */
.share-buttons {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
    border: 2px solid var(--purple-100);
}

.share-label {
    color: var(--purple-700);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    text-align: center;
}

.share-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.share-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.share-btn.whatsapp {
    background: #25D366;
}

.share-btn.whatsapp:hover {
    background: #1ea952;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.share-btn.twitter {
    background: #000000;
}

.share-btn.twitter:hover {
    background: #333333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.share-btn.facebook {
    background: #1877F2;
}

.share-btn.facebook:hover {
    background: #0c63d4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.4);
}

.share-btn.linkedin {
    background: #0A66C2;
}

.share-btn.linkedin:hover {
    background: #084d93;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 102, 194, 0.4);
}

.share-btn.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.share-btn.instagram:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(225, 48, 108, 0.4);
}

.share-btn.copy {
    background: var(--purple-600);
}

.share-btn.copy:hover {
    background: var(--purple-700);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 33, 168, 0.4);
}

@media (max-width: 768px) {
    .share-buttons-grid {
        display: flex;
        overflow-x: auto;
        gap: 0.5rem;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .share-btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
        flex-direction: row;
        gap: 0.5rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .share-btn svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .share-btn {
        font-size: 0.7rem;
        padding: 0.45rem 0.65rem;
    }
    
    .share-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* Resultado - continuação */

.resultado.hidden {
    display: none;
}

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

.resultado-header {
    background: linear-gradient(135deg, var(--purple-800) 0%, var(--purple-900) 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 0.5rem 0.5rem 0 0;
}

.resultado-header h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.descricao-resultado {
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.6;
}

.resultado-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    background: white;
    border: 1px solid var(--gray-200);
    border-top: none;
}

.resultado-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    border-right: 1px solid var(--gray-200);
    text-align: center;
}

.resultado-card:last-child {
    border-right: none;
}

.resultado-card.destaque {
    background: linear-gradient(135deg, var(--purple-50) 0%, var(--purple-100) 100%);
}

.resultado-card-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.resultado-card-valor {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.resultado-card.destaque .resultado-card-label {
    color: var(--purple-700);
}

.resultado-card.destaque .resultado-card-valor {
    color: var(--purple-700);
    font-size: 1.75rem;
}

/* Seções */
.secao-grafico,
.secao-tabela {
    margin-top: 2rem;
}

.titulo-secao {
    background: linear-gradient(135deg, var(--purple-800) 0%, var(--purple-900) 100%);
    color: white;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0.5rem 0.5rem 0 0;
}

.icone-secao {
    font-size: 1.25rem;
}

/* Gráficos */
.graficos-container {
    background: white;
    border: 1px solid var(--gray-200);
    border-top: none;
    padding: 2rem;
}

.grafico-legenda {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.grafico-wrapper-flex {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
}

.grafico-pizza-container {
    position: relative;
    flex-shrink: 0;
}

.grafico-barras-container {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    position: relative;
}

.tooltip-pizza {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    pointer-events: none;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    line-height: 1.6;
}

.tooltip-pizza.hidden {
    display: none;
}

.tooltip-barras {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    pointer-events: none;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    line-height: 1.6;
}

.tooltip-barras.hidden {
    display: none;
}

.tooltip-label {
    color: var(--purple-300);
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

#graficoEvolucao,
#graficoComposicao {
    max-width: 100%;
    height: auto;
    cursor: pointer;
}

/* Tabela */
.tabela-container {
    background: white;
    border: 1px solid var(--gray-200);
    border-top: none;
    overflow-x: auto;
}

#tabelaDetalhada {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

#tabelaDetalhada thead {
    background: var(--gray-100);
}

#tabelaDetalhada th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-300);
}

#tabelaDetalhada tbody tr {
    border-bottom: 1px solid var(--gray-200);
}

#tabelaDetalhada tbody tr:hover {
    background: var(--gray-50);
}

#tabelaDetalhada tbody tr:nth-child(even) {
    background: var(--gray-50);
}

#tabelaDetalhada tbody tr:nth-child(even):hover {
    background: var(--gray-100);
}

#tabelaDetalhada td {
    padding: 0.75rem 1rem;
    color: var(--gray-800);
}

#tabelaDetalhada td:first-child {
    font-weight: 600;
    color: var(--gray-900);
}

/* Botão Ver Mais */
.linha-oculta {
    display: none;
}

.btn-ver-mais {
    background: linear-gradient(135deg, var(--purple-600) 0%, var(--purple-700) 100%);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-ver-mais:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(107, 33, 168, 0.4);
}

.btn-ver-mais span {
    font-size: 0.8rem;
}

/* Info Section */
.info-section {
    margin-bottom: 3rem;
}

.info-card-unico {
    background: white;
    border-radius: 1rem;
    padding: 3rem;
    box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.1);
}

.info-card-unico h2 {
    color: var(--purple-700);
    font-size: 1.75rem;
    margin-bottom: 1rem;
    margin-top: 2.5rem;
}

.info-card-unico h2:first-child {
    margin-top: 0;
}

.info-card-unico h3 {
    color: var(--purple-600);
    font-size: 1.35rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.subtitle-roxo {
    color: var(--purple-700);
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.info-card-unico p {
    color: var(--gray-800);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.lista-destaque {
    list-style: none;
    padding-left: 0;
    margin: 1.25rem 0;
}

.lista-destaque li {
    padding-left: 1.75rem;
    margin-bottom: 0.75rem;
    position: relative;
    color: var(--gray-800);
    font-size: 1.05rem;
    line-height: 1.7;
}

.lista-destaque li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--purple-600);
    font-weight: bold;
    font-size: 1.2rem;
}

.lista-exemplo {
    list-style: none;
    padding: 1.25rem;
    background: var(--purple-50);
    border-left: 4px solid var(--purple-500);
    border-radius: 0.5rem;
    margin: 1.25rem 0;
}

.lista-exemplo li {
    padding: 0.5rem 0;
    color: var(--gray-800);
    font-size: 1.05rem;
}

.formula-box {
    background: linear-gradient(135deg, var(--purple-50) 0%, var(--purple-100) 100%);
    border: 2px solid var(--purple-300);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
    font-size: 1.1rem;
    color: var(--purple-900);
    font-family: 'Courier New', monospace;
}

.dica-destaque {
    background: linear-gradient(135deg, #faf5ff 0%, #ffffff 100%);
    border-left: 4px solid var(--purple-500);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.1);
}

.dica-destaque h3 {
    color: var(--purple-700);
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.dica-destaque p {
    margin-bottom: 0;
    color: var(--gray-800);
    font-size: 1rem;
    line-height: 1.7;
}

.conclusao-destaque {
    background: linear-gradient(135deg, var(--purple-700) 0%, var(--purple-800) 100%);
    color: white !important;
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-top: 2rem;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.8;
    box-shadow: 0 4px 6px rgba(107, 33, 168, 0.3);
}

/* Tips Grid */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.tip-card {
    background: white;
    border-radius: 1rem;
    padding: 1.75rem;
    box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tip-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(139, 92, 246, 0.2);
}

.tip-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.tip-card h3 {
    color: var(--purple-700);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.tip-card p {
    color: var(--gray-700);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Gráficos */
.graficos-container {
    background: white;
    border: 1px solid var(--gray-200);
    border-top: none;
    padding: 2rem;
}

.grafico-legenda {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.grafico-wrapper-flex {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
}

.grafico-pizza-container {
    position: relative;
    flex-shrink: 0;
}

.grafico-barras-container {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
}

.tooltip-pizza {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    pointer-events: none;
    white-space: nowrap;
    z-index: 10;
}

.tooltip-pizza.hidden {
    display: none;
}

#graficoEvolucao,
#graficoComposicao {
    max-width: 100%;
    height: auto;
    cursor: pointer;
}

.legenda-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legenda-cor {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legenda-texto {
    font-size: 0.9rem;
    color: var(--gray-700);
    font-weight: 600;
}

/* Footer */
footer {
    background: #1f2937;
    color: #d1d5db;
    padding: 2rem 0;
    text-align: center;
}

footer p {
    font-size: 0.9rem;
    margin: 0 0 1rem 0;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    font-size: 0.875rem;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    color: white;
    text-decoration: underline;
}

.footer-links span {
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    header .container {
        padding: 2rem 1.5rem;
    }

    .ticker-item {
        padding: 0 1rem;
        font-size: 0.75rem;
    }

    main {
        padding: 2rem 0;
    }

    .calculator-section {
        margin-top: 2rem;
    }

    .calculator-card,
    .info-card,
    .tip-card {
        padding: 1.5rem;
    }

    .tabs {
        gap: 0.25rem;
    }

    .tab-btn {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
        white-space: normal;
        text-align: center;
        line-height: 1.3;
        min-height: 3rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .button-group {
        flex-direction: column;
    }

    .resultado-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .resultado-card {
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
    }

    .resultado-card:nth-child(odd) {
        border-right: 1px solid var(--gray-200);
    }

    .grafico-wrapper-flex {
        flex-direction: column;
    }

    .graficos-container {
        padding: 1rem;
    }

    .tabela-container {
        font-size: 0.8rem;
    }

    #tabelaDetalhada th,
    #tabelaDetalhada td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .calculator-section {
        margin-top: 1.5rem;
    }

    .calculator-card,
    .info-card-unico {
        padding: 1.25rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

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

    .resultado-card {
        border-right: none;
    }

    .resultado-card:nth-child(odd) {
        border-right: none;
    }

    .resultado-card-valor {
        font-size: 1.25rem;
    }

    .resultado-card.destaque .resultado-card-valor {
        font-size: 1.5rem;
    }
}
