@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* --- GLOBAL BOX-SIZING RESET --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* --- METEOROLOGY PREMIUM SYSTEM DESIGN --- */
:root {
    --primary: #0A57B3;
    --primary-dark: #073e80;
    --primary-light: #3b82f6;
    --primary-gradient: linear-gradient(135deg, #09408f 0%, #0A57B3 50%, #1e82ff 100%);
    --accent: #00d2c4;
    --accent-dark: #00b3a6;
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;

    --success: #10b981;
    --success-bg: #ecfdf5;
    --success-border: #a7f3d0;

    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;

    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --warning-border: #fde68a;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 20px 25px -5px rgba(9, 64, 143, 0.08), 0 10px 10px -5px rgba(9, 64, 143, 0.04);

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Reset class for body compatibility */
.meteo-portal-body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
}

/* HERO HEADER METEOROLOGIA */
.meteorologia-hero {
    background: var(--primary-gradient);
    padding: 20px 0 25px 0;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid var(--accent);
}

.meteorologia-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.meteorologia-hero .conteudo {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0;
    position: relative;
    z-index: 2;
}

.meteo-hero-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.meteo-cabecalho-premium {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 0;
}

.meteo-titulo-premium {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.meteo-titulo-premium i {
    color: var(--accent);
    text-shadow: 0 0 10px rgba(0, 210, 196, 0.4);
}

.meteo-status-badge {
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--font-heading);
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.meteo-status-badge.ativa {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.meteo-status-badge.offline {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.meteo-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    max-width: 600px;
    margin: 0;
}

/* BARRA DE CONTROLE E STATUS (FILTRO + TIMESTAMP) */
.meteo-control-status-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 22px;
    box-shadow: var(--shadow-md);
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.meteo-status-leitura-ativa {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    zoom: 1.1;
}

.status-icon-glow {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    box-shadow: 0 2px 10px rgba(10, 87, 179, 0.25);
    flex-shrink: 0;
    animation: pulse 2s infinite;
    zoom: 0.8;
}

.status-texto-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.status-label {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

.status-timestamp {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.3px;
}

/* PAINEL DE CONTROLE / FILTRO COMPACTO (agora dentro da barra branca) */
.meteo-filtro-wrapper-compact {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.meteo-filtro-form-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.meteo-filtro-form-compact label {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.meteo-input-container {
    position: relative;
}

.meteo-input-container i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.meteo-date-input,
.meteo-time-input {
    padding: 8px 12px 8px 32px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--text-main);
    background-color: #ffffff;
    outline: none;
    transition: var(--transition);
}

.meteo-date-input {
    width: 165px;
}

.meteo-time-input {
    width: 125px;
}

.meteo-date-input:focus,
.meteo-time-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(0, 210, 196, 0.2);
}

.meteo-agora-btn {
    padding: 8px 14px;
    background: var(--bg-card);
    color: var(--primary);
    font-family: var(--font-heading);
    font-weight: 650;
    font-size: 0.85rem;
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.meteo-submit-btn+.meteo-agora-btn,
.meteo-agora-btn+.meteo-agora-btn {
    margin-left: 12px;
    /* Espaço adicional em relação ao botão vizinho */
}

.meteo-agora-btn:hover {
    background: var(--primary);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(10, 87, 179, 0.2);
}

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

.meteo-submit-btn {
    padding: 8px 18px;
    background: var(--accent);
    color: #1e293b;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 210, 196, 0.2);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.meteo-submit-btn:hover {
    background: #00ecdcfd;
    box-shadow: 0 4px 10px rgba(0, 210, 196, 0.4);
    transform: translateY(-1px);
}

@media (max-width: 900px) {
    .meteo-control-status-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px 16px;
    }

    .meteo-status-leitura-ativa {
        justify-content: center;
        text-align: center;
    }

    .status-texto-wrapper {
        align-items: center;
    }

    .meteo-filtro-wrapper-compact {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .meteo-filtro-form-compact {
        width: 100%;
        justify-content: center;
        gap: 8px;
    }

    .meteo-filtro-form-compact label {
        display: none;
    }

    .meteo-filtro-form-compact .meteo-input-container {
        width: calc(50% - 4px);
    }

    .meteo-date-input,
    .meteo-time-input {
        width: 100%;
    }

    .meteo-agora-btn {
        width: 100%;
        justify-content: center;
    }

    .meteo-submit-btn+.meteo-agora-btn,
    .meteo-agora-btn+.meteo-agora-btn {
        margin-left: 0;
    }

    .meteo-submit-btn {
        width: 100%;
        justify-content: center;
    }
}

/* BANNER DE INFORMAÇÃO PERSISTENTE */
.meteo-info-alert {
    background-color: rgba(10, 87, 179, 0.05);
    border-left: 5px solid var(--primary);
    color: var(--primary-dark);
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 22px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

.meteo-info-alert i {
    font-size: 1.3rem;
    color: var(--primary);
    flex-shrink: 0;
}

/* BANNER DE AVISO FALLBACK */
.fallback-alert {
    background-color: var(--warning-bg);
    border-left: 5px solid var(--warning);
    color: #78350f;
    padding: 15px 25px;
    border-radius: var(--radius-sm);
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

.fallback-alert i {
    font-size: 1.5rem;
    color: var(--warning);
}

/* SEÇÃO PRINCIPAL */
.meteorologia-conteudo-principal {
    background-color: var(--bg-light);
}

.meteorologia-conteudo-principal .conteudo {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0;
}

/* TITULO SEÇÃO */
.secao-titulo {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 15px;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.secao-titulo i {
    color: var(--primary);
}

/* GRID DO DASHBOARD UNIFORME DE 6 CARDS */
.meteo-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 991px) {
    .meteo-dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 580px) {
    .meteo-dashboard-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.card-meteo-secundario.temperatura i.card-icon {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
}

/* CARDS SECUNDÁRIOS */
.card-meteo-secundario {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    transition: var(--transition);
}

.card-meteo-secundario:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(10, 87, 179, 0.15);
}

.card-meteo-secundario .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.card-meteo-secundario .titulo {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-meteo-secundario i.card-icon {
    font-size: 1.3rem;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-meteo-secundario.umidade i.card-icon {
    background: rgba(14, 165, 233, 0.08);
    color: #0ea5e9;
}

.card-meteo-secundario.vento i.card-icon {
    background: rgba(100, 116, 139, 0.08);
    color: #64748b;
}

.card-meteo-secundario.chuva i.card-icon {
    background: rgba(59, 130, 246, 0.08);
    color: #3b82f6;
}

.card-meteo-secundario.pressao i.card-icon {
    background: rgba(168, 85, 247, 0.08);
    color: #a855f7;
}

.card-meteo-secundario.radiacao i.card-icon {
    background: rgba(245, 158, 11, 0.08);
    color: #f59e0b;
}

.card-meteo-secundario .valor-principal {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 750;
    color: var(--text-main);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.card-meteo-secundario .valor-unidade {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 5px;
}

.card-meteo-secundario>div:nth-child(2) {
    flex-grow: 1;
    display: flex;
    align-items: center;
    padding: 8px 0;
}

.dado-indisponivel {
    font-size: 1.15rem;
    color: var(--text-muted);
    font-weight: 500;
}

.card-meteo-secundario .sub-info {
    font-size: 0.78rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 6px;
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
}

/* CARD ESPECIAL - ESTAÇÃO METEOROLÓGICA (6º CARD) / PARCERIA */
.card-meteo-secundario.estacao-info-card,
.card-meteo-secundario.simepar-parceria-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px dashed var(--border-color);
}

.card-meteo-secundario.estacao-info-card i.card-icon,
.card-meteo-secundario.simepar-parceria-card i.card-icon {
    background: rgba(10, 87, 179, 0.08);
    color: var(--primary);
}

.estacao-status-online {
    color: var(--success);
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.estacao-status-instavel {
    color: var(--warning);
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.estacao-status-offline {
    color: var(--danger);
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.estacao-geo-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.78rem;
    margin: 4px 0;
}

.estacao-geo-list span {
    color: var(--text-muted);
}

.estacao-geo-list strong {
    color: var(--text-main);
}

/* SEÇÃO GRÁFICOS (VARIAÇÃO NO TEMPO) */
.variacao-graficos-section {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
}

/* NAVEGAÇÃO DE ABAS */
.meteo-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
    gap: 5px;
    overflow-x: auto;
    scrollbar-width: none;
}

.meteo-tabs::-webkit-scrollbar {
    display: none;
}

.meteo-tab-btn {
    padding: 8px 16px;
    background: transparent;
    border: none;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: var(--transition);
}

.meteo-tab-btn i {
    margin-right: 6px;
}

.meteo-tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    border-radius: 5px;
    transition: var(--transition);
}

.meteo-tab-btn:hover {
    color: var(--primary);
}

.meteo-tab-btn.active {
    color: var(--primary);
}

.meteo-tab-btn.active::after {
    background: var(--primary);
}

/* PAINEL DAS ABAS */
.meteo-tab-panel {
    display: none;
}

.meteo-tab-panel.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

.chart-wrapper {
    background-color: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 12px;
    border: 1px solid var(--border-color);
    min-height: 270px;
}

/* SEÇÃO TABELA DE LEITURAS BRUTAS */
.tabela-leituras-section {
    margin-bottom: 30px;
}

.tabela-header-control {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 12px;
}

.tabela-botoes {
    display: flex;
    gap: 10px;
}

.btn-premium-toggle {
    padding: 8px 16px;
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-premium-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: var(--bg-light);
}

.btn-premium-csv {
    padding: 8px 16px;
    background: var(--success);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.2);
    transition: var(--transition);
}

.btn-premium-csv:hover {
    background: #0ea975;
    box-shadow: 0 5px 12px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

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

/* TABELA COLAPSÁVEL */
.meteo-tabela-collapse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.meteo-tabela-collapse.expandida {
    max-height: 450px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

.tabela-moderna {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.tabela-moderna th {
    background: var(--primary);
    color: #ffffff;
    padding: 10px 12px;
    font-family: var(--font-heading);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 3;
}

.tabela-moderna td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

.tabela-moderna tbody tr {
    transition: var(--transition);
}

.tabela-moderna tbody tr:nth-child(even) {
    background-color: var(--bg-light);
}

.tabela-moderna tbody tr:hover {
    background-color: rgba(10, 87, 179, 0.04);
}

/* SOBRE A ESTAÇÃO CARD */
.card-sobre-estacao {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 35px;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 40px;
    align-items: center;
    flex-wrap: wrap;
}

.sobre-info {
    flex: 1;
    min-width: 280px;
}

.sobre-info h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.sobre-info p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.meteo-badges-geo {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.meteo-badge-geo-item {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 10px 15px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
}

.meteo-badge-geo-item i {
    color: var(--primary);
}

.sobre-map-card {
    width: 320px;
    height: 180px;
    background: radial-gradient(circle, rgba(10, 87, 179, 0.06) 0%, rgba(10, 87, 179, 0.12) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sobre-map-card i.globe-bg {
    font-size: 8rem;
    color: rgba(10, 87, 179, 0.05);
    position: absolute;
}

.sobre-map-pin {
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.sobre-map-pin i {
    font-size: 2.2rem;
    color: var(--danger);
    text-shadow: 0 4px 10px rgba(239, 68, 68, 0.4);
    animation: bounce 2s infinite ease-in-out;
}

.sobre-map-pin span {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary-dark);
    background: #ffffff;
    padding: 4px 12px;
    border-radius: 50px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-top: 6px;
}

/* ANIMATIONS */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.95;
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* Fix para o Rodapé da Prefeitura */
footer.coluna-principal {
    clear: both !important;
    float: none !important;
    width: 100% !important;
    display: block !important;
}

/* Card Info Trigger styling */
.card-info-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.card-info-trigger {
    margin: 0 0 0 5px !important;
    padding: 0 !important;
    opacity: 0.55;
    transition: opacity 0.2s ease, color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    font-size: 0.85rem !important;
    line-height: 1 !important;
    height: auto !important;
    width: auto !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

.card-info-wrapper:hover .card-info-trigger {
    opacity: 1 !important;
    color: var(--primary) !important;
    transform: scale(1.18);
}

.card-principal-temp .card-info-wrapper:hover .card-info-trigger {
    color: var(--accent) !important;
}

/* --- METEOROLOGY MODALS PREMIUM SYSTEM --- */
.meteo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
}

.meteo-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.meteo-modal-content {
    background: #ffffff;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    border: 1px solid rgba(15, 23, 42, 0.08);
    position: relative;
    transform: scale(0.92) translateY(15px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}

.meteo-modal-overlay.active .meteo-modal-content {
    transform: scale(1) translateY(0);
}

.meteo-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: rgba(15, 23, 42, 0.05);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.meteo-modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: rotate(90deg);
}

.meteo-modal-header {
    padding: 24px 28px 16px 28px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 14px;
}

.meteo-modal-header.header-temperatura {
    border-bottom: 3px solid #ef4444;
}

.meteo-modal-header.header-umidade {
    border-bottom: 3px solid #0ea5e9;
}

.meteo-modal-header.header-chuva {
    border-bottom: 3px solid #3b82f6;
}

.meteo-modal-header.header-vento {
    border-bottom: 3px solid #64748b;
}

.meteo-modal-header.header-pressao {
    border-bottom: 3px solid #a855f7;
}

.meteo-modal-header.header-radiacao {
    border-bottom: 3px solid #f59e0b;
}

.modal-header-icon {
    width: 44px !important;
    height: 44px !important;
    border-radius: var(--radius-sm) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.modal-header-icon i {
    font-size: 1.6rem !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    height: auto !important;
    width: auto !important;
    display: inline-block !important;
}

.header-temperatura .modal-header-icon {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
}

.header-umidade .modal-header-icon {
    background: rgba(14, 165, 233, 0.08);
    color: #0ea5e9;
}

.header-chuva .modal-header-icon {
    background: rgba(59, 130, 246, 0.08);
    color: #3b82f6;
}

.header-vento .modal-header-icon {
    background: rgba(100, 116, 139, 0.08);
    color: #64748b;
}

.header-pressao .modal-header-icon {
    background: rgba(168, 85, 247, 0.08);
    color: #a855f7;
}

.header-radiacao .modal-header-icon {
    background: rgba(245, 158, 11, 0.08);
    color: #f59e0b;
}

.meteo-modal-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.meteo-modal-body {
    padding: 24px 28px 28px 28px;
}

/* DESTAQUE NUMÉRICO EXTRAVAGANTE */
.meteo-modal-destaque-wrapper {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
    text-align: center;
}

.meteo-modal-destaque-rotulo {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.meteo-modal-destaque-valor {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 850;
    line-height: 1.1;
    letter-spacing: -1.5px;
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
}

.meteo-modal-destaque-valor .unidade {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.valor-temperatura {
    color: #ef4444;
}

.valor-umidade {
    color: #0ea5e9;
}

.valor-chuva {
    color: #3b82f6;
}

.valor-vento {
    color: #64748b;
}

.valor-pressao {
    color: #a855f7;
}

.valor-radiacao {
    color: #f59e0b;
}

.conversao-kmh {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 8px;
    letter-spacing: -0.5px;
}

.meteo-modal-sub-destaque {
    font-size: 0.85rem;
    color: var(--text-main);
    margin-top: 8px;
    font-family: var(--font-body);
}

.flex-sub {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* ESCALAS DE GRÁFICO VISUAL (ESCALAS GRADIENTES EM CSS) */
.meteo-grafico-escala-container {
    margin-bottom: 24px;
}

.escala-titulo {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.escala-titulo i {
    color: var(--primary);
}

.meteo-escala-wrapper {
    position: relative;
    padding-top: 32px;
    /* Espaço para o ponteiro flutuante acima */
    padding-bottom: 24px;
    /* Espaço para as marcas numéricas abaixo */
    margin: 0 10px;
}

.meteo-escala-bar {
    height: 12px;
    border-radius: 6px;
    width: 100%;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Gradients para cada escala */
.temperatura-escala-bar {
    background: linear-gradient(to right, #3b82f6 0%, #10b981 30%, #f59e0b 60%, #ef4444 80%, #a855f7 100%);
}

.umidade-escala-bar {
    background: linear-gradient(to right, #ef4444 0%, #f59e0b 12%, #fffbeb 20%, #7dd3fc 30%, #0ea5e9 60%, #2563eb 100%);
}

.chuva-escala-bar {
    background: linear-gradient(to right, #f8fafc 0%, #93c5fd 10%, #3b82f6 50%, #1e3a8a 100%);
}

.vento-escala-bar {
    background: linear-gradient(to right, #10b981 0%, #f59e0b 23.7%, #f97316 48.7%, #ef4444 76.2%, #7f1d1d 100%);
}

.pressao-escala-bar {
    background: linear-gradient(to right, #f97316 0%, #fbbf24 33.3%, #10b981 50%, #8b5cf6 66.7%, #3b82f6 100%);
}

.radiacao-escala-bar {
    background: linear-gradient(to right, #475569 0%, #fef08a 16.7%, #f59e0b 58.3%, #ef4444 100%);
}

.meteo-escala-faixas {
    position: relative;
    width: 100%;
    height: 20px;
}

.faixa-mark {
    position: absolute;
    top: 6px;
    transform: translateX(-50%);
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

/* PONTEIRO DA ESCALA E INDICADOR */
.meteo-escala-ponteiro {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 5;
    transition: left 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.pointer-bubble {
    background: #0f172a;
    color: #ffffff;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 700;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-family: var(--font-heading);
}

.pointer-arrow {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #0f172a;
    margin-top: -1px;
    margin-bottom: 2px;
}

.pointer-arrow::after {
    content: '';
    display: block;
    width: 2px;
    height: 18px;
    background: #0f172a;
    margin-left: -1px;
}

/* DETALHES DE TEXTOS */
.meteo-modal-explicacao {
    font-family: var(--font-body);
    color: var(--text-main);
    font-size: 0.9rem;
    line-height: 1.55;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.intro-texto {
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 16px;
}

.meteo-sub-secao {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 18px 0 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.meteo-sub-secao i {
    color: var(--primary);
    font-size: 0.95rem;
}

.meteo-lista-cuidados,
.meteo-lista-referencias {
    margin: 0;
    padding-left: 20px;
}

.meteo-lista-cuidados li,
.meteo-lista-referencias li {
    margin-bottom: 6px;
}

.meteo-lista-cuidados li::marker {
    color: var(--primary);
}

.meteo-lista-referencias li::marker {
    color: var(--accent-dark);
}

.fonte-nota {
    margin-top: 20px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    text-align: right;
}

/* Customização do scrollbar interno do modal */
.meteo-modal-content::-webkit-scrollbar {
    width: 6px;
}

.meteo-modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
    border-radius: var(--radius-sm);
}

.meteo-modal-content::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.2);
    border-radius: var(--radius-sm);
}

.meteo-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.4);
}

/* Acessibilidade */
.meteo-modal-overlay:focus {
    outline: none;
}

@media (max-width: 640px) {
    .meteo-modal-overlay {
        padding: 10px;
    }

    .meteo-modal-content {
        max-height: 95vh;
        border-radius: var(--radius-md);
    }

    .meteo-modal-header {
        padding: 16px 20px 12px 20px;
    }

    .meteo-modal-body {
        padding: 16px 20px 20px 20px;
    }

    .meteo-modal-destaque-valor {
        font-size: 2.8rem;
    }

    .meteo-modal-destaque-valor .unidade {
        font-size: 1.5rem;
    }
}

/* PAINEL DE AFERIÇÃO DESTACADO (SEÇÃO SEPARADA SUBTILMENTE MAIS ESCURA DE FORA A FORA) */
.meteo-painel-afericao {
    background-color: #f1f5f9;
    /* Tom sutilmente mais escuro que o fundo padrão (#f8fafc) */
    width: 100%;
    padding: 30px 0;
    border-top: 1px solid #e2e8f0;
    /* Divisória superior sutil */
    border-bottom: 1px solid #e2e8f0;
    /* Divisória inferior sutil */
    border-left: none;
    border-right: none;
    border-radius: 0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
    margin-bottom: 30px;
}

@media (max-width: 600px) {
    .meteo-painel-afericao {
        padding: 20px 0;
    }
}

/* ==========================================================================
   COMPARADOR DE PERÍODOS SPECIFIC STYLES
   ========================================================================== */
.meteo-compare-section {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
}

.compare-period-card {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    animation: fadeIn 0.25s ease-out;
}

.compare-period-card .period-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-grow: 1;
    flex-wrap: wrap;
}

.compare-period-card label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 70px;
}

.compare-remove-btn {
    background: transparent;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--transition);
}

.compare-remove-btn:hover {
    background: var(--danger-bg);
    transform: scale(1.05);
}

.add-period-btn-wrapper {
    margin-top: 15px;
    margin-bottom: 25px;
}

.btn-add-period {
    background: #ffffff;
    border: 1.5px dashed var(--primary-light);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-add-period:hover {
    background: var(--bg-light);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.btn-compare-action {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(10, 87, 179, 0.25);
    transition: var(--transition);
}

.btn-compare-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(10, 87, 179, 0.35);
}

.period-badge-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

.p-color-0 {
    background-color: #3b82f6;
}

.p-color-1 {
    background-color: #f59e0b;
}

.p-color-2 {
    background-color: #10b981;
}

.p-color-3 {
    background-color: #8b5cf6;
}

.p-color-4 {
    background-color: #ec4899;
}

.meteo-compare-tabs {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 25px;
}

@media (max-width: 800px) {
    .meteo-compare-tabs {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 500px) {
    .meteo-compare-tabs {
        grid-template-columns: repeat(2, 1fr);
    }
}

.compare-tab-btn {
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 12px 8px;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.compare-tab-btn i {
    font-size: 1.15rem;
    transition: var(--transition);
}

.compare-tab-btn:hover {
    color: var(--primary);
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.compare-tab-btn.active {
    background: var(--primary);
    color: #ffffff !important;
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(10, 87, 179, 0.2);
}

.compare-tab-btn.active i {
    color: #ffffff !important;
}

.tabela-resumo-container {
    margin-top: 35px;
    margin-bottom: 35px;
}

.legend-list {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

/* ==========================================================================
   METEOROLOGIA COMPARATOR LOADING OVERLAY & PROGRESS BAR
   ========================================================================== */
.meteo-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    display: none;
    /* hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.meteo-loading-card {
    background: #ffffff;
    padding: 35px 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg), 0 20px 25px -5px rgba(0, 0, 0, 0.15);
    max-width: 450px;
    width: 90%;
    text-align: center;
    border: 1px solid var(--border-color);
}

.meteo-loading-spinner-wrapper {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.meteo-spinner {
    border: 4px solid rgba(10, 87, 179, 0.1);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border-left-color: var(--primary);
    animation: spin 0.8s linear infinite;
}

.meteo-progress-bar-container {
    width: 100%;
    height: 6px;
    background-color: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin: 20px 0;
}

.meteo-progress-bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 50%, var(--primary) 100%);
    background-size: 200% 100%;
    animation: loadingBar 1.5s infinite linear;
}

.meteo-loading-title {
    font-family: var(--font-heading);
    font-weight: 750;
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: 10px;
}

.meteo-loading-text {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
}

/* Spinner & Progress Bar Keyframes */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes loadingBar {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Custom Tooltip Styling for ApexCharts */
.meteo-custom-tooltip {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    border-radius: 8px !important;
    padding: 12px 14px !important;
    color: #ffffff !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5) !important;
    min-width: 220px;
    font-family: var(--font-heading);
}

.meteo-custom-tooltip .tooltip-header {
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    margin-bottom: 8px;
    border-bottom: 1px solid #334155;
    padding-bottom: 6px;
}

.meteo-custom-tooltip .tooltip-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meteo-custom-tooltip .tooltip-item {
    display: flex;
    flex-direction: column;
}