/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

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

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Navigation Tabs */
.tabs {
    display: flex;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow: hidden;
}

.tab-button {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: white;
    color: #666;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-button:hover {
    background: #f8f9fa;
    color: #333;
}

.tab-button.active {
    background: #22c55e;
    color: white;
}

.tab-button:first-child.active {
    background: #22c55e;
}

.tab-button:nth-child(2).active {
    background: #3b82f6;
}

.tab-button:nth-child(3).active {
    background: #f59e0b;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow: hidden;
}

.card-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.card-header i {
    color: #666;
    font-size: 1.2rem;
}

.card-body {
    padding: 20px;
}

.card-body > p {
    color: #666;
    margin-bottom: 20px;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #22c55e;
}

/* Nível Container */
.nivel-container {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 20px;
    align-items: start;
}

.requisitos-panel {
    background: #f0f9ff;
    border: 2px solid #bae6fd;
    border-radius: 8px;
    padding: 16px;
}

.requisitos-panel h3 {
    color: #0369a1;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.requisitos-content p {
    margin-bottom: 8px;
    color: #0369a1;
}

.requisitos-content strong {
    font-weight: 600;
}

/* Print Button */
.btn-print {
    background: #22c55e;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.btn-print:hover {
    background: #16a34a;
}

/* Saberes Container */
.saberes-container {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.saber-item {
    border-bottom: 1px solid #e9ecef;
    padding: 16px;
    transition: background-color 0.2s ease;
}

.saber-item:hover {
    background: #f8f9fa;
}

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

.saber-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.saber-checkbox {
    margin-top: 4px;
}

.saber-title {
    flex: 1;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
}

.saber-details {
    margin-left: 28px;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.saber-controls {
    margin-left: 28px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: center;
}

.saber-meta {
    font-size: 0.85rem;
    color: #0369a1;
}

.saber-quantidade {
    width: 100px;
    padding: 8px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    text-align: center;
}

.saber-pontos {
    font-weight: 600;
    color: #22c55e;
    min-width: 80px;
    text-align: right;
}

/* Histórico */
.historico-section {
    margin-bottom: 24px;
}

.historico-section h3 {
    margin-bottom: 16px;
    color: #333;
    font-size: 1.2rem;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.status-item .label {
    font-weight: 500;
    color: #666;
}

.status-item .value {
    font-weight: 600;
    color: #333;
}

.progress-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.progress-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 12px;
    align-items: center;
}

.progress-label {
    font-weight: 500;
    color: gray;
}

.progress-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #22c55e;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
    min-width: 60px;
    text-align: right;
}

.alcanceRSCpretendido {
    display: flex;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin-top: 20px;
    border: 2px solid #b1fab1;

    padding: 10px; 
    background: #e6ffe6; 
    color: #207520; 
    border-radius: 5px; 
    font-weight: bold;"
}

.falta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

.falta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #fef3c7;
    border-radius: 6px;
}

.falta-item .label {
    font-weight: 500;
    color: #92400e;
}

.falta-item .value {
    font-weight: 600;
    color: #d97706;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.result-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-top: 4px solid #22c55e;
}

.result-card h3 {
    color: #666;
    font-size: 1rem;
    margin-bottom: 12px;
    font-weight: 500;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.result-label {
    color: #666;
    font-size: 0.9rem;
}

/* Status Níveis */
.status-niveis {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nivel-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.nivel-status.atende {
    background: #f0fdf4;
    border-color: #22c55e;
}

.nivel-status.nao-atende {
    background: #fef2f2;
    border-color: #ef4444;
}

.nivel-info h4 {
    margin-bottom: 4px;
    color: #333;
}

.nivel-info p {
    color: #666;
    font-size: 0.9rem;
}

.nivel-resultado {
    text-align: right;
}

.nivel-resultado .status {
    font-weight: 600;
    margin-bottom: 4px;
}

.nivel-resultado .atende .status {
    color: #22c55e;
}

.nivel-resultado .nao-atende .status {
    color: #ef4444;
}

.nivel-resultado .detalhes {
    font-size: 0.85rem;
    color: #666;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 400px;
    margin: 20px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab-button {
        border-bottom: 1px solid #e9ecef;
    }
    
    .tab-button:last-child {
        border-bottom: none;
    }
    
    .nivel-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .saber-controls {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .progress-item {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: center;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
        font-size: 12pt;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .header,
    .tabs,
    .btn-print {
        display: none;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ccc;
        margin-bottom: 20px;
        page-break-inside: avoid;
    }
    
    .card-header {
        background: #f0f0f0;
        border-bottom: 1px solid #ccc;
    }
    
    .tab-content {
        display: block !important;
    }
    
    .chart-container {
        display: none;
    }
}

