/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* PIN Popup Styles */
.pin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.pin-popup {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.pin-header {
    margin-bottom: 30px;
}

.pin-header i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 15px;
}

.pin-header h2 {
    font-size: 1.8rem;
    color: #2d3748;
    margin-bottom: 10px;
    font-weight: 700;
}

.pin-header p {
    color: #718096;
    font-size: 1rem;
}

.pin-form {
    margin-bottom: 20px;
}

.pin-form input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1.2rem;
    text-align: center;
    letter-spacing: 2px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.pin-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.pin-form button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pin-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.pin-error {
    color: #e53e3e;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 10px;
    background: rgba(229, 62, 62, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(229, 62, 62, 0.2);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.dashboard-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-content h1 i {
    color: #667eea;
}

.header-content p {
    font-size: 1.1rem;
    color: #718096;
    font-weight: 400;
}

/* Filtros */
.filters-section {
    margin-bottom: 30px;
}

.filter-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-filter {
    position: relative;
    margin-bottom: 20px;
}

.search-filter i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 1.1rem;
}

.search-filter input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

.search-filter input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.schools-list {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    overflow-x: auto;
    padding: 10px 0;
}

.school-chip {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.school-chip:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    transform: translateY(-2px);
}

.school-chip.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.school-chip i {
    font-size: 0.9rem;
}

/* Estatísticas */
.stats-section {
    margin-bottom: 30px;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.total-students .stat-icon {
    background: linear-gradient(135deg, #4299e1, #3182ce);
}

.with-photo .stat-icon {
    background: linear-gradient(135deg, #48bb78, #38a169);
}

.without-photo .stat-icon {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
}

.school-info .stat-icon {
    background: linear-gradient(135deg, #9f7aea, #805ad5);
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 5px;
}

.stat-content p {
    font-size: 1rem;
    color: #4a5568;
    font-weight: 600;
    margin-bottom: 5px;
}

.stat-percentage {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 8px;
    background: #edf2f7;
    color: #4a5568;
}

.stat-subtitle {
    font-size: 0.85rem;
    color: #718096;
    font-style: italic;
}

/* Lista de Alunos */
.students-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header h2 i {
    color: #667eea;
}

.page-info {
    background: #edf2f7;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    color: #4a5568;
}

/* Tabela */
.students-table {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.table-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: grid;
    grid-template-columns: 60px 80px 2fr 1.5fr 1fr 120px;
    gap: 15px;
    padding: 20px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.student-row {
    display: grid;
    grid-template-columns: 60px 80px 2fr 1.5fr 1fr 120px;
    gap: 15px;
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    align-items: center;
    transition: all 0.3s ease;
}

.student-row:hover {
    background: rgba(102, 126, 234, 0.05);
    transform: translateX(5px);
}

.student-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.student-cell.name {
    justify-content: flex-start;
    font-weight: 600;
    color: #2d3748;
}

.student-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

.photo-placeholder {
width: 40px;
height: 40px;
border-radius: 50%;
background: #edf2f7;
display: flex;
align-items: center;
justify-content: center;
color: #a0aec0;
font-size: 1.2rem;
}

.status-badge {
padding: 6px 12px;
border-radius: 20px;
font-size: 0.8rem;
font-weight: 600;
text-transform: uppercase;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.with-photo {
    background: #c6f6d5;
    color: #22543d;
}

.status-badge.without-photo {
    background: #fed7cc;
    color: #c53030;
}

/* Paginação */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pagination button {
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #4a5568;
}

.pagination button:hover:not(:disabled) {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.pagination button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info select {
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
}

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.loading-spinner i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 15px;
}

.loading-spinner p {
    color: #4a5568;
    font-weight: 600;
}

/* Responsivo */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 15px;
    }
    
    .header-content h1 {
        font-size: 2rem;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .filters-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .schools-list {
        justify-content: center;
    }
    
    .table-header {
        grid-template-columns: 50px 60px 2fr 1fr 1fr 100px;
        padding: 15px;
        font-size: 0.8rem;
    }
    
    .student-row {
        grid-template-columns: 50px 60px 2fr 1fr 1fr 100px;
        padding: 15px;
        gap: 10px;
    }
    
    .student-cell {
        font-size: 0.8rem;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .table-header {
        grid-template-columns: 40px 1fr 80px 80px 80px;
        font-size: 0.7rem;
    }
    
    .student-row {
        grid-template-columns: 40px 1fr 80px 80px 80px;
    }
    
    .table-header .header-cell:nth-child(2) {
        display: none;
    }
    
    .student-row .student-cell:nth-child(2) {
        display: none;
    }
}

.schools-info {
    margin-top: 10px;
    text-align: center;
    color: #666;
    font-size: 12px;
}

/* Filtros adicionais */
.additional-filters {
    display: flex;
    gap: 25px;
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 15px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    backdrop-filter: blur(10px);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 220px;
    flex: 1;
}

.filter-group label {
    color: #4a5568;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.filter-group label i {
    color: #667eea;
    font-size: 16px;
}

.filter-group select {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #2d3748;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filter-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.filter-group select:hover {
    border-color: #cbd5e0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.filter-group select option {
    background: #fff;
    color: #2d3748;
    padding: 10px;
    font-weight: 500;
}

.filter-group select option:hover {
    background: #f7fafc;
}

@media (max-width: 768px) {
    .additional-filters {
        flex-direction: column;
        gap: 20px;
        padding: 15px;
    }
    
    .filter-group {
        min-width: auto;
    }
}
