/* CSS Base e Rolagem Suave */
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background-color: #f8f9fa; }
html, body, #pageWrapper { min-height: 100vh; }

/* Responsividade do Layout 100vh */
@media (min-width: 960px) {
    .sidebar { height: 100vh; overflow-y: auto; }
    .map-container { height: 100vh; }
}
@media (max-width: 959px) {
    #map { height: 60vh; } /* Em celulares, o mapa ocupa 60% da tela */
}

.uk-link, a {color: #009999;}
.uk-background-primary {background: #009999;}

#map { width: 100%; height: 100%; z-index: 1; }

/* ESTILOS DOS DONUTS */
.card-titulo { font-size: 0.7rem; text-transform: uppercase; color: #666; margin: 0 0 8px 0; white-space: nowrap; }
.donut-container { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.donut-chart {
    width: 60px; height: 60px; border-radius: 50%;
    background: conic-gradient(#e5e5e5 100%, #e5e5e5 0);
    display: flex; align-items: center; justify-content: center;
    transition: background 0.5s ease-in-out;
}
.donut-inner {
    width: 46px; height: 46px; background-color: #fff;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: bold; color: #333;
}

/* HEADER */
.header-panel { background: #009999; color: white; padding: 20px 0; border-bottom: 4px solid #006666; }
.header-panel .uk-nav a {padding: 15px 25px; line-height: 22px;}
.header-panel .uk-nav a.uk-button {color: #fff; text-transform: none; font-weight: bold; border: 3px solid #006666; font-size: 16px;}
.header-panel .uk-nav a.uk-button.retraction:hover {background: #e46a68;}
.header-panel .uk-nav a.uk-button.correction:hover {background: #fcda6b;}
.header-line {border-top: 8px solid #009999;}

/* SECTION 1: MAPA E TIMELINE */
.dashboard-container { height: calc(100vh - 100px); min-height: 650px; display: flex; }

/* TIMELINE (Coluna 1) */
.timeline-sidebar { height: 100%; overflow-y: auto; background: #fff; padding: 20px; box-shadow: 2px 0 10px rgba(0,0,0,0.05); z-index: 10; }
.timeline { border-left: 3px solid #e5e5e5; padding-left: 20px; margin-left: 10px; margin-top: 20px; }
.timeline-item { position: relative; margin-bottom: 25px; }
.timeline-icon {
    position: absolute; left: -33px; top: 0; width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; border: 3px solid #fff; color: white;
}
.timeline-content { background: #f8f9fa; padding: 12px; border-radius: 6px; border: 1px solid #e5e5e5; }

.uk-text-success {color: #009999!important;}

.uk-badge {background: #009999!important; color: #fff!important;}

.retraction {background: #c94947; color: #fff;}
.correction {background: #eec84c; color: #fff;}
.uk-button-primary {background-color: #009999!important;}
.uk-button-primary:hover {background-color: #00aaaa!important;}

.uk-link-text:hover {text-decoration: none;}

.uk-modal-dialog {width: 100%; max-width: 800px!important;}

#xml-preview {min-height: 380px;}

/* MAPA (Coluna 2) */
.map-wrapper { height: 100%; position: relative; z-index: 1; }
#map { height: 100%; width: 100%; background-color: #e5e5e5; }

/* OVERLAYS DO MAPA */
.map-controls-overlay {
    position: absolute; top: 20px; right: 20px; z-index: 1000;
    background: rgba(255, 255, 255, 0.95); padding: 15px; border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15); backdrop-filter: blur(5px);
}

.map-donuts-overlay {
    position: absolute; bottom: 20px; left: 20px; right: 20px; z-index: 1000;
    background: rgba(255, 255, 255, 0.95); padding: 15px; border-radius: 8px;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.1); backdrop-filter: blur(5px);
    overflow-x: auto;
}

/* SECTION 2: CARDS */
.module-card { transition: transform 0.3s ease, box-shadow 0.3s ease; border: none; }
.module-card:hover { transform: translateY(-5px); box-shadow: 0 15px 25px rgba(0,0,0,0.1); }
.card-retraction { border-top: 5px solid #f0506e; }
.card-correction { border-top: 5px solid #32d296; }
.icon-wrapper { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.icon-retraction { background-color: rgba(240, 80, 110, 0.1); color: #f0506e; }
.icon-correction { background-color: rgba(50, 210, 150, 0.1); color: #32d296; }

.footer-panel { background: #222; color: #aaa; padding: 30px 0; font-size: 0.85rem; margin-top: 50px; }
footer img {opacity: 0.7;}

.highlight-new {
border: 2px solid #1e87f0 !important;
box-shadow: 0 4px 15px rgba(30, 135, 240, 0.3) !important;
background-color: #ffffff !important;
transform: scale(1.02);
transition: all 0.3s ease;
}
.badge-new {
background-color: #1e87f0; color: white; 
font-size: 0.6rem; padding: 2px 6px; 
border-radius: 4px; text-transform: uppercase;
margin-left: 8px; font-weight: bold;
}

/* EFEITO CLICÁVEL NA TIMELINE */
.timeline-clickable {
cursor: pointer;
transition: background-color 0.2s ease, border-color 0.2s ease;
}
.timeline-clickable:hover {
background-color: #eaf2fa !important;
border-color: #1e87f0 !important;
}

.floating-feedback {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #009999; /* Cor padrão do seu sistema */
    color: #ffffff;
    border-radius: 50px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 9999; /* Garante que fique acima de tudo */
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

/* Estado de Hover (Quando passa o mouse) */
.floating-feedback:hover, 
.floating-feedback:focus {
    background-color: #007a7a; /* Um tom mais escuro para o hover */
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px); /* Pequeno efeito de flutuação */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* O texto inicia escondido (largura zero e transparente) */
.floating-feedback .floating-text {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    font-weight: bold;
    font-size: 0.85rem;
    transition: max-width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), 
                opacity 0.3s ease, 
                margin-left 0.3s ease;
}

/* Quando passa o mouse, o texto ganha largura e aparece suavemente */
.floating-feedback:hover .floating-text {
    max-width: 155px; /* Largura suficiente para a palavra "Feedback" */
    opacity: 1;
    margin-left: 8px; /* Cria um respiro entre o ícone e o texto */
}