:root {
    --midnight-blue: #003087;
    --dark-slate-gray: #4D4D4D;
    --dim-gray: #707070;
    --gray: #787A7E;
    --silver: #BDBDBD;
    --lavender: #E6E6E6;
    --chocolate: #F25C1A;
    --white-smoke: #F0F0F0;
    --coral: #FA8C30;
    --snow: #FCFCFC;
    --primary: #EC6608;
    --bg-body: var(--snow);
    --border-color: var(--lavender);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --success: #2E7D32;
    --danger: #D32F2F;
    --info: #1d7dbf;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--dark-slate-gray);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { color: var(--midnight-blue); font-weight: 700; line-height: 1.2; }
ul { list-style: none; }
a { text-decoration: none; color: inherit; }

.container { max-width: 1152px; margin: 0 auto; padding: 0 1.5rem; }
.grid { display: grid; gap: 1.5rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.text-center { text-align: center; }

@media (min-width: 768px) {
    .md-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .md-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .md-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
    .md-grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
}

header {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 1rem 0;
}

.logo-box {
    width: 40px; height: 40px;
    background-color: var(--primary);
    color: white; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; font-size: 1.25rem;
    overflow: hidden;
}

.logo-box img { width: 28px; height: 28px; object-fit: contain; }

.btn-export {
    padding: 0.5rem 1rem;
    background: var(--midnight-blue);
    color: white; border: none; border-radius: 0.5rem;
    font-size: 0.8rem; font-weight: 600;
    cursor: pointer; display: flex; align-items: center; gap: 0.4rem;
    transition: background 0.2s;
}

.btn-export:hover { background: #001a5e; }

.hero-section { text-align: center; margin: 3rem 0 2rem; }

.badge-pill {
    display: inline-block; background-color: var(--white-smoke);
    color: var(--primary); padding: 0.375rem 1rem;
    border-radius: 9999px; font-size: 0.875rem; font-weight: 600;
    margin-bottom: 0.5rem;
}

.hero-title { font-size: 2.25rem; margin-bottom: 0.75rem; }

@media (min-width: 768px) { .hero-title { font-size: 3rem; } }

.hero-subtitle { font-size: 1.1rem; color: var(--dim-gray); }

.section-block { margin-bottom: 3.5rem; }

.section-title-container {
    display: flex; align-items: center; gap: 0.75rem;
    margin-bottom: 1.5rem; padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--lavender);
}

.section-title { font-size: 1.35rem; color: var(--midnight-blue); }

.section-number {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; background: var(--primary);
    color: white; border-radius: 50%; font-size: 0.85rem; font-weight: 700;
    flex-shrink: 0;
}

.card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    transition: box-shadow 0.3s, transform 0.3s;
}

.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.stat-card { border-top: 4px solid var(--primary); text-align: center; padding: 1.25rem; }

.stat-card .stat-value {
    font-size: 2rem; font-weight: 800; color: var(--midnight-blue);
    margin: 0.5rem 0 0.25rem;
}

.stat-card .stat-label {
    font-size: 0.78rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--gray);
}

.progress-container { margin-bottom: 1.5rem; }
.progress-header { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
.progress-label { font-size: 0.85rem; font-weight: 600; color: var(--dim-gray); }
.progress-value { font-size: 0.85rem; font-weight: 700; color: var(--primary); }

.progress-bar-bg {
    width: 100%; height: 12px; background: var(--lavender);
    border-radius: 6px; overflow: hidden;
}

.progress-bar-fill {
    height: 100%; border-radius: 6px;
    background: linear-gradient(90deg, var(--primary), var(--coral));
    transition: width 1.2s ease-out;
}

.timeline-container {
    background: white; border: 1px solid var(--border-color);
    border-radius: 0.75rem; padding: 1.5rem;
    overflow-x: auto; margin-top: 1.5rem;
}

.timeline-container::-webkit-scrollbar { height: 6px; }
.timeline-container::-webkit-scrollbar-track { background: var(--white-smoke); border-radius: 3px; }
.timeline-container::-webkit-scrollbar-thumb { background: var(--silver); border-radius: 3px; }

.timeline-header { font-size: 0.9rem; color: var(--dim-gray); margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }

.timeline-track {
    display: flex; align-items: flex-start;
    min-width: max-content; padding: 0.5rem 0 1rem;
    position: relative;
}

.timeline-track::before {
    content: ''; position: absolute;
    top: 22px; left: 60px; right: 60px; height: 3px;
    background: linear-gradient(90deg, var(--lavender) 0%, var(--primary) 50%, var(--coral) 100%);
    border-radius: 3px; z-index: 0;
}

.timeline-node {
    display: flex; flex-direction: column; align-items: center;
    min-width: 150px; padding: 0 1.25rem; position: relative; z-index: 1;
    cursor: pointer; transition: transform 0.2s;
}

.timeline-node:hover { transform: translateY(-3px); }

.timeline-dot {
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--lavender); border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: all 0.3s; margin-bottom: 0.75rem;
}

.timeline-node.active .timeline-dot {
    background: var(--primary); width: 22px; height: 22px;
    box-shadow: 0 0 0 5px rgba(236, 102, 8, 0.2), 0 2px 8px rgba(0,0,0,0.15);
}

.timeline-node:hover .timeline-dot {
    background: var(--coral);
    box-shadow: 0 0 0 4px rgba(236, 102, 8, 0.15);
}

.timeline-info { text-align: center; }
.timeline-sprint-name { font-size: 0.8rem; font-weight: 700; color: var(--midnight-blue); display: block; }
.timeline-periodo { font-size: 0.7rem; color: var(--gray); display: block; margin-top: 0.15rem; }
.timeline-metrics { margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.2rem; align-items: center; }

.timeline-metric {
    font-size: 0.72rem; color: var(--dim-gray);
    background: var(--white-smoke); padding: 0.2rem 0.5rem;
    border-radius: 4px; white-space: nowrap;
}

.timeline-metric strong { color: var(--primary); }
.timeline-node.active .timeline-metric { background: rgba(236,102,8,0.08); }

.entrega-area-card {
    border-left: 4px solid var(--primary);
    position: relative; overflow: hidden;
}

.entrega-area-header {
    display: flex; align-items: center; gap: 0.75rem;
    margin-bottom: 1rem; padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--white-smoke);
}

.entrega-area-icon {
    width: 2.5rem; height: 2.5rem; border-radius: 0.5rem;
    display: flex; align-items: center; justify-content: center;
    color: white;
}

.entrega-area-name { font-size: 1.15rem; font-weight: 700; color: var(--midnight-blue); }

.entrega-area-count {
    font-size: 0.72rem; font-weight: 600;
    background: var(--white-smoke); color: var(--dim-gray);
    padding: 0.2rem 0.6rem; border-radius: 999px; margin-left: auto;
}

.entrega-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.55rem 0; border-bottom: 1px solid var(--white-smoke);
}

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

.entrega-item-id {
    font-family: monospace; font-size: 0.72rem; font-weight: 600;
    color: var(--primary); padding: 0.2rem 0.55rem;
    border-radius: 999px; border: 1px solid rgba(236, 102, 8, 0.3);
    background: rgba(236, 102, 8, 0.08); white-space: nowrap; flex-shrink: 0;
}

.entrega-item-title { font-size: 0.88rem; color: var(--dark-slate-gray); line-height: 1.4; }

.desafio-card {
    position: relative; overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.desafio-card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.4s;
}

.desafio-card.bug-card::before { background: linear-gradient(90deg, #D32F2F, #EF5350); }
.desafio-card.desvio-card::before { background: linear-gradient(90deg, #E65100, #FF9800); }
.desafio-card.problema-card::before { background: linear-gradient(90deg, #1565C0, #42A5F5); }
.desafio-card:hover::before { transform: scaleX(1); }
.desafio-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.desafio-badge {
    display: inline-flex; align-items: center; gap: 0.3rem;
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; padding: 0.25rem 0.65rem;
    border-radius: 999px; margin-bottom: 0.75rem;
}

.desafio-badge-bug { background: #FFE4E4; color: #D32F2F; }
.desafio-badge-desvio { background: #FFF3E0; color: #E65100; }
.desafio-badge-problema { background: #E3F2FD; color: #1565C0; }

.impact-card {
    position: relative; overflow: hidden;
    border-left: 4px solid var(--primary);
    background: linear-gradient(135deg, white 0%, rgba(236, 102, 8, 0.02) 100%);
}

.impact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.impact-icon-bg {
    width: 3rem; height: 3rem;
    background: rgba(236, 102, 8, 0.1);
    border: 1px solid rgba(236, 102, 8, 0.2);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: var(--primary); margin-bottom: 1rem;
}

.impact-resultado {
    margin-top: 1rem; padding-top: 0.75rem;
    border-top: 1px dashed var(--border-color);
}

.impact-resultado-label {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    color: var(--primary); margin-bottom: 0.2rem; display: block;
}

.future-table-wrapper {
    background: white; border: 1px solid var(--border-color);
    border-radius: 0.75rem; overflow: hidden;
}

.future-table-scroll {
    max-height: 320px; overflow-y: auto;
}

.future-table-scroll::-webkit-scrollbar { width: 6px; }
.future-table-scroll::-webkit-scrollbar-track { background: var(--white-smoke); }
.future-table-scroll::-webkit-scrollbar-thumb { background: var(--silver); border-radius: 3px; }

.future-table { width: 100%; border-collapse: collapse; }
.future-table thead { position: sticky; top: 0; z-index: 1; }

.future-table thead th {
    background: var(--midnight-blue); color: white;
    padding: 0.875rem 1rem; font-size: 0.78rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.05em; text-align: left;
}

.future-table tbody td {
    padding: 0.875rem 1rem; font-size: 0.875rem;
    border-bottom: 1px solid var(--white-smoke);
}

.future-table tbody tr:hover { background: rgba(236, 102, 8, 0.03); }
.future-table tbody tr:last-child td { border-bottom: none; }

.priority-badge {
    display: inline-block; padding: 0.2rem 0.65rem; border-radius: 999px;
    font-size: 0.7rem; font-weight: 700;
}

.priority-alta { background: #FFE4E4; color: #D32F2F; }
.priority-media { background: #FFF3E0; color: #E65100; }
.priority-baixa { background: #E8F5E9; color: #2E7D32; }

.voce-sabia-section {
    background: linear-gradient(135deg, var(--midnight-blue) 0%, #001a5e 100%);
    border-radius: 1rem; padding: 3rem 2.5rem; color: white;
    position: relative; overflow: hidden;
}

.voce-sabia-section::before {
    content: ''; position: absolute; top: -50%; right: -20%;
    width: 60%; height: 200%;
    background: radial-gradient(ellipse, rgba(236, 102, 8, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.voce-sabia-section h3 { color: white; margin-bottom: 1.5rem; font-size: 1.5rem; }

.voce-sabia-badge {
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: rgba(236, 102, 8, 0.3); color: var(--coral);
    padding: 0.3rem 0.85rem; border-radius: 999px;
    font-size: 0.78rem; font-weight: 700; margin-bottom: 1rem;
}

.voce-sabia-text {
    font-size: 1.05rem; line-height: 1.8;
    color: rgba(255,255,255,0.92); max-width: 820px;
    position: relative; z-index: 1;
}

.voce-sabia-analogia {
    margin-top: 1.5rem; padding: 1.25rem 1.5rem;
    background: rgba(255,255,255,0.08);
    border-left: 3px solid var(--coral);
    border-radius: 0 0.5rem 0.5rem 0;
    font-size: 0.95rem; line-height: 1.7;
    color: rgba(255,255,255,0.82);
    position: relative; z-index: 1;
}

footer {
    margin-top: 3rem; padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    background-color: white;
}

.footer-text { font-size: 0.875rem; color: var(--gray); }

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

.animate-in {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-in-delay-1 { animation-delay: 0.1s; }
.animate-in-delay-2 { animation-delay: 0.2s; }
.animate-in-delay-3 { animation-delay: 0.3s; }

@media print {
    header { position: relative !important; }
    .future-table thead { position: relative !important; }
    .btn-export, .no-print, #btn-expand-futuros { display: none !important; }
    .animate-in { opacity: 1 !important; animation: none !important; transform: none !important; }
    .card:hover { transform: none !important; box-shadow: var(--shadow-sm) !important; }
    .future-table-scroll { max-height: none !important; overflow: visible !important; }
    .future-table-wrapper { overflow: visible !important; }
    .section-block { break-inside: avoid; }
    .voce-sabia-section { break-inside: avoid; }
    .card { break-inside: avoid; }
    .stat-card { break-inside: avoid; }
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
    body { background: white !important; }
    .container { max-width: 100% !important; padding: 0 1rem !important; }
    .hero-section {
        text-align: center !important;
        margin: 2rem auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .hero-title { text-align: center !important; }
    .hero-subtitle { text-align: center !important; }
    .badge-pill { text-align: center !important; }
    #stats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1rem !important;
    }
    .md-grid-cols-4 { grid-template-columns: repeat(2, 1fr) !important; }
    .md-grid-cols-3 { grid-template-columns: repeat(2, 1fr) !important; }
    .md-grid-cols-5 { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 767px) {
    .container { padding: 0 1rem; }
    .hero-title { font-size: 1.75rem; }
    .stat-card .stat-value { font-size: 1.5rem; }
    .future-table-scroll { max-height: 250px; }
    .voce-sabia-section { padding: 2rem 1.25rem; }
    .header-desktop-right { flex-wrap: wrap; gap: 0.5rem; }
}

#page-loader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.4s ease;
}

.loader-spinner {
    width: 48px; height: 48px;
    border: 4px solid var(--lavender);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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