/* Estilos específicos para página de Grade Semanal */

.content-wrapper-grade {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filtros-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.filtros-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.filtros-header h3 {
    color: #0a7a83;
    font-size: 1.5em;
    border-bottom: 2px solid #0a7a83;
    padding-bottom: 10px;
    flex: 1;
}

.filtros-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.info-label {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 5px;
}

.info-value {
    font-size: 1.5em;
    font-weight: 700;
    color: #333;
}

.info-value.status-pago {
    color: #28a745;
}

.info-value.status-pendente {
    color: #ffc107;
}

.info-value.status-atrasado {
    color: #dc3545;
}

.grade-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.grade-container {
    min-width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.grade-header {
    display: grid;
    grid-template-columns: 120px repeat(7, 1fr);
    background: linear-gradient(135deg, #0a7a83 0%, #0fbec6 100%);
    color: white;
    font-weight: 700;
}

.grade-horario-col {
    padding: 15px;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.grade-dia {
    padding: 15px;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.grade-dia:last-child {
    border-right: none;
}

.grade-body {
    display: flex;
    flex-direction: column;
}

.grade-row {
    display: grid;
    grid-template-columns: 120px repeat(7, 1fr);
    border-bottom: 1px solid #e0e0e0;
    min-height: 60px;
}

.grade-row:last-child {
    border-bottom: none;
}

.grade-horario {
    padding: 15px;
    text-align: center;
    background: #f8f9fa;
    font-weight: 600;
    color: #0a7a83;
    border-right: 2px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.grade-horario-inicio {
    font-size: 1em;
}

.grade-horario-fim {
    font-size: 0.85em;
    color: #999;
}

.grade-cell {
    padding: 8px;
    border-right: 1px solid #e0e0e0;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.grade-cell:last-child {
    border-right: none;
}

.aluno-card-grade {
    background: white;
    border-radius: 6px;
    padding: 8px 10px;
    border-left: 4px solid #0a7a83;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 5px;
}

.aluno-card-grade:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.aluno-card-grade.status-pago {
    border-left-color: #28a745;
    background: #f0f9f2;
}

.aluno-card-grade.status-pendente {
    border-left-color: #ffc107;
    background: #fffef5;
}

.aluno-card-grade.status-atrasado {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.aluno-card-grade.troca-temporaria {
    border-left-color: #17a2b8;
    background: #e7f3f5;
    border-left-width: 5px;
    position: relative;
}

.aluno-nome-grade {
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
    text-align: center;
    word-wrap: break-word;
}

.troca-badge {
    background: #17a2b8;
    color: white;
    font-size: 0.7em;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-align: center;
    margin-top: 4px;
    letter-spacing: 0.5px;
}

.sem-aluno {
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.legenda-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.legenda-section h4 {
    color: #0a7a83;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.legenda-items {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.legenda-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9em;
    color: #666;
}

.legenda-cor {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid #e0e0e0;
}

.legenda-cor.status-pago {
    background: #28a745;
    border-color: #28a745;
}

.legenda-cor.status-pendente {
    background: #ffc107;
    border-color: #ffc107;
}

.legenda-cor.status-atrasado {
    background: #dc3545;
    border-color: #dc3545;
}

.legenda-cor.sem-aluno {
    background: #f8f9fa;
    border-color: #e0e0e0;
}

.legenda-cor.troca-temporaria {
    background: #17a2b8;
    border-color: #17a2b8;
}

.chamada-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chamada-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.chamada-header-texto h3 {
    color: #0a7a83;
    font-size: 1.5em;
    margin-bottom: 6px;
}

.chamada-header-texto p {
    color: #555;
    font-size: 0.95em;
}

.chamada-controles {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.chamada-data,
.chamada-horario {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85em;
    color: #666;
}

.chamada-data input,
.chamada-horario select {
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    min-width: 200px;
    transition: all 0.3s ease;
    background: #fff;
    color: #1f2937;
}

.chamada-data input:focus,
.chamada-horario select:focus {
    outline: none;
    border-color: #0a7a83;
    box-shadow: 0 0 0 3px rgba(10, 122, 131, 0.12);
}

.chamada-resumo {
    display: flex;
    gap: 14px;
    padding: 12px 16px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(10, 122, 131, 0.18);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.chamada-resumo-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 90px;
    text-align: center;
}

.chamada-resumo-item span {
    font-size: 0.8em;
    color: #666;
}

.chamada-resumo-item strong {
    font-size: 1.4em;
    color: #0a7a83;
}

.chamada-lista {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.chamada-lista-vazia {
    padding: 30px;
    text-align: center;
    color: #666;
    background: #ffffff;
    border: 1px dashed rgba(10, 122, 131, 0.2);
    border-radius: 12px;
}

.chamada-slot {
    background: #ffffff;
    border: 1px solid rgba(10, 122, 131, 0.15);
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.chamada-slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(10, 122, 131, 0.08), rgba(15, 190, 198, 0.12));
    border-bottom: 1px solid rgba(10, 122, 131, 0.12);
    gap: 12px;
    flex-wrap: wrap;
}

.chamada-slot-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chamada-slot-horario {
    font-size: 1.2em;
    font-weight: 700;
    color: #023c45;
}

.chamada-slot-dia {
    font-size: 0.9em;
    color: #555;
}

.chamada-slot-contagem {
    font-size: 0.9em;
    font-weight: 600;
    color: #045d66;
    background: rgba(15, 190, 198, 0.12);
    padding: 6px 12px;
    border-radius: 999px;
}

.chamada-slot-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 20px;
}

.chamada-aluno {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(2, 47, 54, 0.12);
    border-radius: 12px;
    transition: all 0.2s ease;
    background: #ffffff;
}

.chamada-aluno.presente {
    border-color: rgba(40, 167, 69, 0.3);
    background: rgba(40, 167, 69, 0.08);
}

.chamada-aluno.ausente {
    border-color: rgba(220, 53, 69, 0.3);
    background: rgba(220, 53, 69, 0.08);
}

.chamada-aluno-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.chamada-aluno-nome {
    font-size: 1em;
    font-weight: 600;
    color: #023c45;
}

.chamada-aluno-badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75em;
    font-weight: 600;
    color: #045d66;
    background: rgba(15, 190, 198, 0.2);
}

.chamada-aluno-acoes {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.chamada-btn {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(2, 47, 54, 0.18);
    background: #ffffff;
    color: #045d66;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chamada-btn:hover {
    background: rgba(15, 190, 198, 0.15);
    transform: translateY(-1px);
}

.chamada-btn.ativo {
    background: linear-gradient(135deg, #022f36 0%, #0a7a83 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 10px 18px rgba(2, 47, 54, 0.22);
}

.chamada-hint {
    font-size: 0.85em;
    color: #666;
    text-align: center;
    margin-top: 12px;
}

/* Responsividade */
@media (max-width: 1200px) {
    .grade-container {
        min-width: 800px;
    }
}

@media (max-width: 968px) {
    .filtros-info {
        grid-template-columns: repeat(2, 1fr);
    }

    .chamada-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .chamada-controles {
        align-items: stretch;
    }

    .chamada-resumo {
        width: 100%;
        justify-content: space-between;
    }

    .grade-section {
        padding: 15px;
    }

    .grade-container {
        min-width: 600px;
    }

    .grade-horario-col,
    .grade-dia {
        padding: 10px;
        font-size: 0.9em;
    }

    .grade-horario {
        padding: 10px;
    }

    .aluno-card-grade {
        padding: 8px;
    }

    .aluno-nome-grade {
        font-size: 0.85em;
    }

    .chamada-slot-body {
        padding: 16px;
    }

    .chamada-aluno {
        flex-direction: column;
        align-items: flex-start;
    }

    .chamada-aluno-acoes {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    .chamada-controles {
        flex-direction: column;
        gap: 12px;
    }

    .chamada-data input,
    .chamada-horario select {
        min-width: 100%;
    }

    .chamada-resumo {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .chamada-resumo-item {
        align-items: flex-start;
        text-align: left;
    }
}

