/* Minimal CSS para o projeto (simplificado) */
:root {
    --primary-color: #2563eb;
    --purple-color: #7c3aed;
    --background-color: #f7f7f8;
    --card-background: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --border-radius: 10px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --transition: all 0.2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
    height: 100%;
    scroll-behavior: smooth;
}
body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: var(--background-color);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 64px;
}
body > main {
    flex: 1;
    display: flex;
    flex-direction: column;
}
a { color: var(--primary-color); text-decoration: none; }
a:hover { text-decoration: underline; }
button:focus-visible, a:focus-visible { outline: 2px solid rgba(37,99,235,0.4); outline-offset: 2px; }

/* Header básico */
.app-header { 
    background: #2563eb; 
    color: #fff; 
    padding: 16px; 
    text-align: center; 
}
.app-header h1 { 
    font-size: 20px; 
    font-weight: 600; 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
}
.app-subtitle { 
    font-size: 14px; 
    opacity: 0.95; 
    margin-top: 4px; }
.app-logo { 
    height: 36px; 
    width: auto; 
    border-radius: 6px; 
}

/* Layout e seções */
.main-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.content-section {
    display: none;
    flex: 1;
}
.content-section.active {
    display: block;
}

/* Hero / Info */
.hero-notice {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    background: linear-gradient(135deg, rgba(37,99,235,.08), rgba(124,58,237,.08));
    border: 1px solid rgba(37,99,235,0.18);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}
.hero-notice-icon {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    color: #2563eb;
    font-size: 24px;
}
.hero-notice-content h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #1f2937;
    font-weight: 600;
}
.hero-notice-content p {
    color: #6b7280;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.6;
}
.hero-link {
    display: inline-block;
    font-weight: 600;
    color: #2563eb;
    font-size: 14px;
}
.info-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(37,99,235,0.08);
    color: #1f2937;
    border: 1px solid rgba(37,99,235,0.2);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
}
.info-banner i {
    color: #2563eb;
    font-size: 16px;
}

/* Upload / ações */
.upload-area { 
    border: 2px dashed #e5e7eb;
    background: #fff;
    padding: 24px;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 16px;
}
.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.upload-icon {
    font-size: 32px;
    color: #2563eb;
}
.btn-primary, .btn-analyze, .btn-export, .btn-clear, .btn-remove {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.btn-primary:hover, .btn-export:hover {
    filter: brightness(0.95);
}
.btn-clear:hover {
    background: #b91c1c;
}
.btn-analyze:hover {
    background: #15803d;
}
.btn-analyze { 
    background: #16a34a; 
    width: 100%; 
    justify-content: center; }
.btn-export { 
    background: #7c3aed;
 }
.btn-clear { 
    background: #dc2626;
 }
.btn-remove { 
    background: transparent; 
    color: #6b7280; 
    border: 1px solid #e5e7eb; 
    padding: 0; width: 32px; 
    height: 32px; 
    border-radius: 8px; 
    justify-content: center; 
}

/* Cartão do arquivo */
.file-info { 
    background: var(--card-background); 
    border: 1px solid var(--border-color); 
    border-radius: var(--border-radius); 
    padding: 16px; 
    margin-bottom: 16px; 
}
.file-details { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    margin-bottom: 12px; 
}
.file-details i { 
    color: #2563eb; 
    font-size: 22px; 
}
.badge { 
    display: inline-block; 
    padding: 3px 8px; 
    font-size: 11px; 
    font-weight: 600; 
    border-radius: 999px; 
    background: #eff6ff; 
    color: var(--primary-color); 
    border: 1px solid #bfdbfe; 
}

/* Progresso */
.progress-container { 
    background: var(--card-background); 
    border: 1px solid var(--border-color); 
    border-radius: var(--border-radius); 
    padding: 16px; 
    margin-bottom: 16px; 
}
.progress-info { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 10px; 
}
.progress-bar { 
    background: var(--border-color); 
    height: 8px; 
    border-radius: 4px; 
    overflow: hidden; 
}
.progress-fill { 
    background: #22c55e; 
    height: 100%; 
    width: 0%; 
    transition: width 0.3s ease; 
}

/* Resultados */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
    flex-wrap: wrap;
}
.results-header h2 { 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    font-size: 18px; 
}
.results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.summary-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.summary-card.success i { color: #16a34a; }
.summary-card.warning i { color: #f59e0b; }
.summary-card.error i { color: #dc2626; }
.results-content {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px;
}
.results-content .no-results { max-width: 760px; margin: 8px auto; padding: 16px; border: 1px dashed #e5e7eb; border-radius: 10px; background: #f8fafc; text-align: center; color: #6b7280; }
.results-content .no-results i { display: block; font-size: 22px; color: #2563eb; margin-bottom: 8px; }

/* Problemas */
.problem-section h3 {
    margin: 16px 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}
.problem-item { background: var(--card-background); border: 1px solid var(--border-color); border-radius: 8px; padding: 12px; margin-bottom: 8px; border-left: 4px solid var(--border-color); }
.problem-item.error { border-left-color: #dc2626; background: #fef2f2; }
.problem-item.warning { border-left-color: #f59e0b; background: #fffbeb; }
.problem-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.problem-line { background: #e5e7eb; color: #6b7280; padding: 2px 6px; border-radius: 4px; font-size: 12px; white-space: nowrap; }

/* Histórico */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 12px; flex-wrap: wrap; }
.section-header h2 { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; }
.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.no-history { background: var(--card-background); border: 1px dashed var(--border-color); color: var(--text-secondary); border-radius: var(--border-radius); padding: 16px; text-align: center; }
.no-history i { display: block; font-size: 20px; color: #2563eb; margin-bottom: 6px; }
.history-item { background: var(--card-background); border: 1px solid var(--border-color); border-radius: var(--border-radius); padding: 14px; }
.history-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.history-title { font-weight: 600; }
.history-date { color: #6b7280; font-size: 12px; white-space: nowrap; }
.history-summary { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.history-stat { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.history-stat.success { color: #16a34a; } .history-stat.warning { color: #f59e0b; } .history-stat.error { color: #dc2626; }

/* Bottom nav simples */
.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--card-background);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 100;
}
.nav-item { display: flex; flex-direction: column; align-items: center; color: #6b7280; padding: 6px; border-radius: 8px; min-width: 56px; }
.nav-item.active { color: #2563eb; background: #eff6ff; }
.nav-item i { font-size: 18px; margin-bottom: 2px; }
.nav-item span { font-size: 11px; font-weight: 500; }

/* Footer padronizado e responsivo */
footer.site-footer {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: #ffffff;
    padding: 16px 0;
    margin-top: auto;
    width: 100%;
    border-top: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
    min-height: 44px;
}
.footer-inner a {
    color: #dbeafe;
    padding: 4px 8px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s ease;
    white-space: nowrap;
}
.footer-inner a:hover {
    background: rgba(255,255,255,0.15);
    color: #ffffff;
}
.footer-brand {
    font-weight: 600;
    color: #ffffff;
}
.bullet {
    opacity: 0.6;
    margin: 0 4px;
    color: #bfdbfe;
    user-select: none;
}

/* Responsivo básico */
@media (max-width: 768px) {
    .main-content {
        padding: 12px;
    }
    
    
    body {
        padding-bottom: 64px;
    }
    
    footer.site-footer {
        padding: 12px 0;
        min-height: 50px;
    }
    .footer-inner {
        font-size: 0.9rem;
        gap: 6px;
        padding: 0 12px;
        min-height: 38px;
    }
    .footer-inner a {
        padding: 3px 6px;
        font-size: 0.85rem;
    }
    
    .standalone-page {
        padding: 1.5rem 1rem 2rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 8px;
    }
    
    body {
        padding-bottom: 64px;
    }
    
    footer.site-footer {
        padding: 10px 0;
        min-height: 48px;
    }
    .footer-inner {
        font-size: 0.8rem;
        gap: 4px;
        padding: 0 8px;
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        min-height: 36px;
    }
    .footer-inner a {
        padding: 2px 4px;
        font-size: 0.75rem;
    }
    .bullet {
        margin: 0 2px;
        font-size: 0.7rem;
    }
    
    .standalone-page {
        padding: 1rem 0.75rem 2rem;
    }
    
    .app-header {
        padding: 12px;
    }
    .app-header h1 {
        font-size: 18px;
    }
    
    .problem-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .problem-line {
        align-self: flex-start;
    }
    
    .history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .results-summary {
        grid-template-columns: 1fr;
    }
}

/* Componentes comuns para páginas standalone */
body > .standalone-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-bottom: 2rem;
}

.card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.link-list {
    margin: 8px 0 0 18px;
}
.link-list li { margin-bottom: 6px; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 1rem;
    padding: 0.6rem 1rem;
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.back-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}


