/* ===== DESIGN SYSTEM ===== */
:root {
    --primary: #007F6D;
    --primary-light: #00a88f;
    --primary-dark: #005f52;
    --primary-bg: #e8f5f3;
    --primary-muted: #b2d8d2;
    --surface: #ffffff;
    --surface-2: #f8fafb;
    --surface-3: #f0f4f3;
    --border: #e2e8e6;
    --text-primary: #1a2e2b;
    --text-secondary: #4a6360;
    --text-muted: #8aa5a0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .07), 0 1px 2px rgba(0, 0, 0, .05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .08), 0 2px 4px rgba(0, 0, 0, .05);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, .10), 0 4px 8px rgba(0, 0, 0, .06);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
}

* {
    box-sizing: border-box;
}

/* body {
    font-family: 'Inter', 'Source Sans Pro', sans-serif;
    background: var(--surface-2);
    color: var(--text-primary);
} */

a {
    color: var(--primary);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

/* PAGE WRAPPER */
.fc-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

/* HEADER */
.fc-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 20px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.fc-header::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, .06);
    border-radius: 50%;
}

.fc-header::after {
    content: '';
    position: absolute;
    bottom: -60px;
    right: 80px;
    width: 160px;
    height: 160px;
    background: rgba(255, 255, 255, .04);
    border-radius: 50%;
}

.fc-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.fc-header-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, .18);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.fc-header h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 2px;
    letter-spacing: -.2px;
}

.fc-header-sub {
    font-size: 13px;
    opacity: .8;
    font-weight: 400;
}

.fc-badge-atualizado {
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, .18);
    border-radius: 30px;
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, .2);
    white-space: nowrap;
}

.fc-badge-atualizado .dot {
    width: 8px;
    height: 8px;
    background: #5dffc8;
    border-radius: 50%;
    box-shadow: 0 0 6px #5dffc8;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: .5
    }
}

/* NAV DIAS */
.fc-dias-section {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 18px 20px 0;
    margin-bottom: 4px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.fc-dias-header {
    display: flex;
    align-items: stretch;
    gap: 8px;
    flex-wrap: nowrap;
    padding-bottom: 6px;
    width: 100%;
}

.fc-dia-seta {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all .2s;
}

.fc-dia-seta:hover {
    background: var(--primary-bg);
    border-color: var(--primary-muted);
    color: var(--primary);
}

.fc-dia-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border);
    cursor: pointer;
    text-decoration: none !important;
    color: var(--text-secondary);
    flex: 1;
    min-width: 0;
    text-align: center;
    transition: all .2s ease;
    background: var(--surface);
    line-height: 1.5;
}

.fc-dia-card:hover:not(.active) {
    background: var(--surface-3);
    border-color: var(--primary-muted);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.fc-dia-card.active,
.fc-dia-card.show.active {
    background: var(--primary-bg) !important;
    border-color: var(--primary-muted) !important;
    color: var(--primary) !important;
    box-shadow: 0 2px 8px rgba(0, 127, 109, .12) !important;
    transform: translateY(-1px);
}

.fc-dia-card .dia-semana {
    font-size: 12px;
    font-weight: 500;
}

.fc-dia-card .dia-data {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -.3px;
}

.fc-dia-card .dia-hoje {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-top: 2px;
    opacity: .85;
}

/* NAV TURNOS — oculto no desktop, visível apenas no mobile */
.fc-turnos-bar {
    display: none;
    justify-content: center;
    padding: 6px 0 8px;
}

.fc-turnos-pill {
    display: inline-flex;
    background: var(--surface-2);
    border-radius: var(--radius-xl);
    padding: 5px;
    gap: 3px;
    border: 1px solid var(--border);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05);
}

.fc-turno-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 9px 20px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    text-decoration: none !important;
    color: var(--text-secondary);
    min-width: 95px;
    text-align: center;
    transition: all .25s ease;
    gap: 3px;
}

.fc-turno-btn:hover:not(.active) {
    background: var(--surface);
    color: var(--text-primary);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.fc-turno-btn.active,
.fc-turno-btn.show.active {
    background: linear-gradient(150deg, var(--primary) 0%, var(--primary-light) 100%) !important;
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(0, 127, 109, .35) !important;
}

.fc-turno-btn i {
    font-size: 16px;
}

.fc-turno-btn .t-nome {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.fc-turno-btn .t-hora {
    font-size: 10px;
    line-height: 1.2;
    opacity: .8;
}

/* CONTENT GRID */
.fc-content-grid {
    display: grid;
    grid-template-columns: 377px 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width:960px) {
    .fc-content-grid {
        grid-template-columns: 1fr;
    }

    .fc-mapa-wrap {
        order: 2;
    }

    .fc-painel {
        order: 1;
    }
}

/* MAPA */
.fc-mapa-wrap {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    padding-bottom: 0px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.fc-mapa-wrap::before {
    content: none;
}

.fc-mapa-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.fc-mapa-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: .6px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.fc-mapa-title i {
    color: var(--primary);
    font-size: 14px;
}

.fc-btn-legenda {
    font-size: 12px;
    font-weight: 500;
    color: var(--primary);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px 12px;
    cursor: pointer;
    transition: all .2s;
}

.fc-btn-legenda:hover {
    background: var(--surface-3);
    border-color: var(--primary-muted);
    color: var(--primary);
}

.fc-mapa-canvas {
    background: var(--surface-2);
    border-radius: var(--radius-md);
    padding: 12px 0px;
    position: relative;
    z-index: 1;
    border: 1px solid var(--border);
}

.mapa-background {
    width: 318px;
    height: 416px;
    border-radius: var(--radius-sm);
    position: relative;
    background-size: 100% 100%;
    margin: 0 auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
    overflow: visible;
}

.fc-mapa-nota {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 12px;
    font-style: italic;
    position: relative;
    z-index: 1;
}

/* ---- ANIMAÇÕES DOS ÍCONES DO MAPA ---- */
@keyframes iconFloat {

    0%,
    100% {
        transform: translateY(0);
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .25));
    }

    50% {
        transform: translateY(-3px);
        filter: drop-shadow(0 5px 8px rgba(0, 127, 109, .35));
    }
}

@keyframes iconPulse {

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

    50% {
        opacity: .82;
        transform: scale(.93);
    }
}

/* ícones do mapa — flutuação suave */
.mapa-background>div {
    cursor: pointer;
    /* animation: iconFloat 3.2s ease-in-out infinite; */
    will-change: transform;
}

/* escalonamento dos delays para que não flutuem sincronizados */
.mapa-background>div:nth-child(3n+1) {
    animation-delay: 0s;
}

.mapa-background>div:nth-child(3n+2) {
    animation-delay: .9s;
}

.mapa-background>div:nth-child(3n+3) {
    animation-delay: 1.8s;
}

/* ao passar o mouse: pausa a flutuação e destaca */
.mapa-background>div:hover {
    animation: none;
    transform: scale(1.22) translateY(-3px) !important;
    filter: drop-shadow(0 4px 10px rgba(0, 127, 109, .55)) brightness(1.12);
    z-index: 20 !important;
    transition: transform .18s ease, filter .18s ease;
}

/* cards do painel clicáveis */
.fc-painel-turno-btn {
    cursor: pointer;
    transition: all .2s ease;
}

.fc-painel-turno-btn:hover:not(.fc-turno-ativo) {
    border-color: var(--primary-muted) !important;
    background: var(--surface-3) !important;
    transform: translateX(3px);
}

/* PAINEL LATERAL */
.fc-painel {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fc-descricao-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.fc-descricao-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.fc-descricao-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.fc-descricao-text {
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--text-primary);
    font-weight: 400;
}

.fc-painel-dia-titulo {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.fc-label-hora {
    margin-left: auto;
    font-size: 10px;
    font-weight: 400;
    opacity: .65;
    letter-spacing: 0;
    text-transform: none;
}

.fc-descricao-card+.fc-descricao-card {
    margin-top: 0;
}

.fc-turno-ativo .fc-descricao-label {
    color: var(--primary);
}

.fc-turno-ativo {
    border-color: var(--primary-muted) !important;
    background: var(--primary-bg) !important;
    box-shadow: 0 2px 8px rgba(0, 127, 109, .12) !important;
}

/* ANALISE */
.fc-analise-section {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-top: 4px;
}

.fc-analise-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-3);
    flex-wrap: wrap;
    gap: 10px;
}

.fc-analise-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.fc-analise-title i {
    color: var(--primary);
    font-size: 16px;
}

.fc-analise-date {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 4px;
}

.fc-btn-resumo {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-bg);
    border: 1.5px solid var(--primary-muted);
    border-radius: var(--radius-sm);
    padding: 7px 16px;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
}

.fc-btn-resumo:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    text-decoration: none;
}

.fc-analise-body {
    display: grid;
    grid-template-columns: 1fr 340px;
}

@media (max-width:768px) {
    .fc-analise-body {
        grid-template-columns: 1fr;
    }
}

.fc-analise-text {
    padding: 22px;
    font-size: 14.5px;
    line-height: 1.8;
    color: var(--text-primary);
    border-right: 1px solid var(--border);
}

@media (max-width:768px) {
    .fc-analise-text {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
}

.fc-analise-imagem {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--surface);
    border-left: 1px solid var(--border);
}

.fc-analise-imagem-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.fc-analise-imagem-title i {
    color: var(--primary);
}

.fc-analise-imagem-frame {
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

.fc-analise-imagem img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform .3s ease;
}

.fc-analise-imagem-label {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
}

/* CARDS DE INFO (Dúvidas + App) dentro do painel de imagem */
.fc-info-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fc-info-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none !important;
    color: var(--text-secondary);
    transition: background .2s, border-color .2s;
}

a.fc-info-card:hover {
    background: var(--primary-bg);
    border-color: var(--primary-muted);
    color: var(--primary);
}

.fc-info-card-icon {
    width: 34px;
    height: 34px;
    background: var(--primary-bg);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 14px;
    flex-shrink: 0;
}

.fc-info-card-body {
    flex: 1;
    min-width: 0;
}

.fc-info-card-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.fc-info-card-sub {
    font-size: 11px;
    color: var(--primary);
    font-weight: 500;
}

.fc-info-card-arrow {
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.fc-footer-apps {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.fc-footer-apps .img-reduced {
    max-width: 95px;
    height: auto;
}

/* FOOTER ROW (vazio — mantido para compat) */
.fc-footer-row {
    display: none;
}

/* ESTADO VAZIO */
.fc-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.fc-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--primary-muted);
    display: block;
}

.fc-empty h4 {
    font-weight: 600;
    color: var(--text-secondary);
}

/* MODAL */
.modal-content {
    border-radius: var(--radius-lg) !important;
    border: none !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .18) !important;
    overflow: hidden;
}

.modal-header {
    background: var(--surface-3);
    border-bottom: 1px solid var(--border);
    padding: 18px 22px;
}

.modal-title {
    font-weight: 700;
    color: var(--text-primary);
}

.modal-footer {
    border-top: 1px solid var(--border);
    padding: 14px 22px;
}

/* LEGENDA */
.fc-legenda-previsao {
    background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 100%);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    color: #fff;
}

.fc-legenda-previsao h5 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 12px;
    opacity: .9;
}

.fc-legenda-previsao ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fc-legenda-previsao li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.fc-legenda-previsao li:last-child {
    border-bottom: none;
}

.legenda-icone {
    width: 40px;
    flex-shrink: 0;
}

.fc-legenda-macro {
    background: var(--surface-2);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    border: 1px solid var(--border);
}

.fc-legenda-macro h5 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--primary);
    margin-bottom: 12px;
}

.fc-legenda-macro ol {
    padding-left: 18px;
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 2;
}

/* LEGENDA MACRORREGIÕES NO MAPA */
.fc-mapa-regioes {
    margin-top: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    background: var(--surface-2);
}

.fc-mapa-regioes-titulo {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fc-mapa-regioes-titulo i {
    color: var(--primary);
    font-size: 12px;
}

.fc-mapa-regioes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px 10px;
}

.fc-mapa-regiao-item {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.fc-regiao-num {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fc-regiao-nome {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.3;
    min-width: 0;
}

.bordasNav {
    border: none !important;
    padding: 0 !important;
}

.nav-tabs {
    border: none;
}

.nav-tabs .nav-item.show .nav-link,
.nav-tabs .nav-link.active {
    background: transparent;
    border: none;
}

.tab-pane {
    transition: opacity .2s ease;
}

#list_prevision {
    margin: 0;
    padding: 0;
}

#list_prevision li {
    list-style: none;
}

.icone {
    width: 40px;
}

/* ===== MOBILE ===== */
@media (max-width:640px) {

    /* HEADER */
    .fc-header {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .fc-header h1 {
        font-size: 15px;
    }

    .fc-badge-atualizado {
        font-size: 11px;
        padding: 5px 11px;
    }

    /* NAV DIAS */
    .fc-dias-section {
        padding: 12px 12px 0;
    }

    .fc-dias-header {
        gap: 6px;
        padding-bottom: 12px;
        justify-content: space-between;
    }

    .fc-dia-seta {
        display: none;
    }

    .fc-dia-card {
        flex: 1;
        min-width: 0;
        padding: 8px 6px;
        border-radius: var(--radius-sm);
    }

    .fc-dia-card .dia-data {
        font-size: 14px;
    }

    .fc-dia-card .dia-semana {
        font-size: 11px;
    }

    .fc-dia-card .dia-hoje {
        font-size: 9px;
    }

    /* LEGENDA MACRORREGI\u00d5ES NO MOBILE */
    .fc-mapa-regioes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .fc-regiao-nome {
        font-size: 10px;
    }

    /* NAV TURNOS */
    .fc-turnos-bar {
        display: flex;
        padding: 10px 0 6px;
        align-items: stretch;
    }

    .fc-turnos-pill {
        width: 100%;
        border-radius: var(--radius-md);
        display: flex;
    }

    .fc-turno-btn {
        flex: 1;
        min-width: 0;
        padding: 8px 4px;
        border-radius: var(--radius-sm);
        gap: 2px;
    }

    .fc-turno-btn i {
        font-size: 15px;
    }

    .fc-turno-btn .t-nome {
        font-size: 11px;
    }

    .fc-turno-btn .t-hora {
        display: none;
    }

    /* MAPA — escala via JS preservando posições absolutas dos ícones */
    .fc-mapa-scale-outer {
        width: 100%;
        overflow: hidden;
        position: relative;
    }

    .mapa-background {
        transform-origin: top left;
    }

    /* PAINEL */
    .fc-painel-dia-titulo {
        font-size: 10px;
    }

    /* No mobile: oculta todos os cards e mostra só o ativo */
    .fc-descricao-card {
        display: none;
    }

    .fc-descricao-card.fc-turno-ativo {
        display: block;
        padding: 14px 16px;
    }

    .fc-descricao-text {
        font-size: 13.5px;
    }
}