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

:root {
    --primary-color: #1e40af;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --dark-color: #1f2937;
    --light-bg: #f9fafb;
    --white: #ffffff;
    --text-dark: #111827;
    --text-gray: #6b7280;
    --border-color: #e5e7eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a8a 100%);
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.logo p {
    font-size: 0.875rem;
    opacity: 0.9;
}

.nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: opacity 0.3s;
}

.nav a:hover {
    opacity: 0.8;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 50%, #1e293b 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 3rem;
}

.kpi-cards-mini {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.kpi-card-mini {
    background: rgba(255,255,255,0.15);
    padding: 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.kpi-card-mini .kpi-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.kpi-card-mini .kpi-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.kpi-card-mini .kpi-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Sections */
.section {
    padding: 4rem 0;
}

.bg-light {
    background: var(--light-bg);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.section-subtitle {
    text-align: center;
    color: var(--text-gray);
    font-size: 1.125rem;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.kpi-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.kpi-icon-large {
    font-size: 2.5rem;
}

.kpi-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.kpi-status.ok {
    background: #d1fae5;
    color: #065f46;
}

.kpi-status.warning {
    background: #fef3c7;
    color: #92400e;
}

.kpi-card h3 {
    font-size: 1.125rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
    font-weight: 500;
}

.kpi-main-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.kpi-main-value .unit {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-gray);
}

.kpi-meta {
    color: var(--text-gray);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.kpi-progress {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    border-radius: 10px;
    transition: width 0.5s ease;
}

.progress-fill.warning {
    background: linear-gradient(90deg, var(--accent-color), var(--warning));
}

/* Flow Section */
.flow-legend {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.flow-legend h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.legend-icon {
    font-size: 1.25rem;
}

.flow-diagram {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: center;
}

.flow-diagram img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Alçadas Grid */
.alcadas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.alcada-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    text-align: center;
    border: 2px solid var(--border-color);
    transition: transform 0.3s, border-color 0.3s;
}

.alcada-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.alcada-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.alcada-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.alcada-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.alcada-card p {
    color: var(--text-gray);
    font-size: 0.875rem;
    line-height: 1.6;
}

.info-box {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.info-box h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.info-box ol {
    margin-left: 1.5rem;
}

.info-box li {
    margin-bottom: 0.75rem;
    color: var(--text-gray);
}

.info-box strong {
    color: var(--text-dark);
}

/* Sistemas Grid */
.sistemas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.sistema-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.sistema-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.sistema-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.sistema-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.sistema-desc {
    color: var(--text-gray);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.sistema-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feature-tag {
    background: var(--light-bg);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-gray);
    border: 1px solid var(--border-color);
}

/* Auditoria */
.audit-header {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.audit-score {
    text-align: center;
}

.score-circle {
    position: relative;
    width: 200px;
    height: 200px;
}

.score-circle svg {
    width: 100%;
    height: 100%;
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--secondary-color);
}

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

.checklist {
    background: var(--white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
}

.checklist h3 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.checklist-items {
    display: grid;
    gap: 1rem;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    background: var(--light-bg);
    border-left: 4px solid var(--secondary-color);
}

.check-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.check-content strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

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

/* Documentação */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.doc-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.doc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.doc-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.doc-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.doc-card p {
    color: var(--text-gray);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.doc-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: color 0.3s;
}

.doc-link:hover {
    color: var(--secondary-color);
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.footer-section h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.footer-section p {
    opacity: 0.8;
    font-size: 0.875rem;
    line-height: 1.6;
}

.footer-copy {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.7;
    font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .kpi-grid,
    .alcadas-grid,
    .sistemas-grid,
    .docs-grid {
        grid-template-columns: 1fr;
    }
    
    .nav {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .kpi-main-value {
        font-size: 2rem;
    }
}
