/* =========================================================
   iGestão Escolar - Área dos Responsáveis
   CSS reutilizável para telas em cards / Material Design
   Salvar como: app/resources/responsavel-material-cards.css
   ========================================================= */

:root {
    --resp-primary: #6200b3;
    --resp-primary-dark: #4b008f;
    --resp-primary-soft: #efe3ff;
    --resp-accent: #ff8a00;
    --resp-success: #2ecc71;
    --resp-info: #0d8bf2;
    --resp-warning: #ffc233;
    --resp-danger: #ef4444;
    --resp-surface: #ffffff;
    --resp-page: #f7f7fb;
    --resp-row: #f1f1f3;
    --resp-row-alt: #e6e6e9;
    --resp-border: #e5e7eb;
    --resp-text: #202124;
    --resp-muted: #6b7280;
    --resp-radius: 12px;
    --resp-shadow: 0 3px 10px rgba(0,0,0,.12);
    --resp-shadow-soft: 0 1px 4px rgba(0,0,0,.10);
}

.form-container,
.evento-timeline-page,
.horario-wrap,
.ausencias-wrap {
    width: 100%;
}

/* Painel/base */
.evento-timeline-page {
    padding: 8px;
}

.evento-main-panel,
.resp-material-panel {
    background: var(--resp-surface);
    border: 1px solid var(--resp-border);
    border-radius: var(--resp-radius);
    box-shadow: var(--resp-shadow-soft);
    overflow: hidden;
}

/* Cabeçalhos marcantes, próximos ao padrão MadBuilder/material */
.evento-page-header,
.resp-section-header,
.horario-turma-titulo,
.ausencias-resumo-titulo {
    background: linear-gradient(180deg, var(--resp-primary) 0%, var(--resp-primary-dark) 100%);
    color: #fff;
    font-weight: 800;
}

.evento-page-header {
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.panel-title.card-title,
.evento-page-title {
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
}

.evento-page-subtitle {
    font-size: 12px;
    opacity: .92;
    margin-top: 4px;
}

.evento-page-year-badge {
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

/* Calendário */
.evento-timeline-loader {
    text-align: center;
    color: var(--resp-muted);
    font-size: 12px;
    padding: 12px;
    min-height: 44px;
    background: #fafafa;
}

.evento-timeline-list {
    padding: 12px;
    background: #fff;
}

.evento-month-separator {
    margin: 12px 0 9px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--resp-primary-soft);
    color: var(--resp-primary-dark);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    border: 1px solid #ddc7ff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.evento-row-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--resp-row);
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #dedee3;
    box-shadow: var(--resp-shadow-soft);
}

.evento-row-card:nth-of-type(even) {
    background: var(--resp-row-alt);
}

.evento-row-date {
    flex: 0 0 82px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

time.icon {
    font-size: .6em;
    display: block;
    position: relative;
    width: 7em;
    height: 7em;
    background-color: #fff;
    margin: 0 .5em;
    border-radius: .7em;
    box-shadow: 0 1px 0 #bdbdbd, 0 2px 0 #fff, 0 3px 0 #bdbdbd, 0 4px 0 #fff, 0 5px 0 #bdbdbd, 0 0 0 1px #bdbdbd;
    overflow: hidden;
}

time.icon * {
    display: block;
    width: 100%;
    font-size: 1em;
    font-weight: 800;
    font-style: normal;
    text-align: center;
}

time.icon strong {
    position: absolute;
    top: 0;
    padding: .4em 0;
    color: #fff;
    background-color: var(--resp-accent);
    border-bottom: 1px dashed #f37302;
    box-shadow: 0 2px 0 var(--resp-accent);
    text-transform: capitalize;
}

time.icon em {
    position: absolute;
    bottom: .3em;
    color: var(--resp-accent);
    text-transform: capitalize;
}

time.icon span {
    width: 100%;
    font-size: 2.8em;
    letter-spacing: -.05em;
    padding-top: .8em;
    color: var(--resp-text);
}

.evento-row-content {
    flex: 1;
    min-width: 0;
    padding-top: 5px;
}

.evento-item {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dddde2;
}

.evento-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.evento-tipo-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #2e8b57;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    border-radius: 6px;
    padding: 4px 9px;
    margin-bottom: 5px;
    text-transform: uppercase;
    line-height: 1.2;
}

.evento-tipo-badge:before {
    content: "\\f073";
    font-family: "Font Awesome 5 Free", "FontAwesome";
    font-weight: 900;
}

.evento-desc {
    font-size: 14px;
    color: var(--resp-text);
    font-weight: 700;
    line-height: 1.35;
    word-break: break-word;
}

.evento-empty {
    font-size: 13px;
    color: var(--resp-muted);
    font-style: italic;
    padding-top: 8px;
}

.evento-hoje {
    margin-top: 4px;
    font-size: 11px;
    color: var(--resp-primary-dark);
    font-weight: 800;
}

/* Horário */
.horario-wrap {
    padding: 2px;
}

.horario-turma-titulo {
    font-size: 18px;
    border-radius: var(--resp-radius) var(--resp-radius) 0 0;
    padding: 16px 18px;
    margin: 0 0 12px;
    box-shadow: var(--resp-shadow-soft);
}

.grade-mobile { display: block; }
.grade-desktop { display: none; }

.dia-card {
    background: #fff;
    border: 1px solid var(--resp-border);
    border-radius: var(--resp-radius);
    margin-bottom: 12px;
    box-shadow: var(--resp-shadow);
    overflow: hidden;
}

.dia-card-titulo {
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(180deg, var(--resp-primary) 0%, var(--resp-primary-dark) 100%);
    padding: 12px 14px;
}

.dia-card-linha {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    border-top: 1px solid #ededf0;
    background: #f7f7f7;
}

.dia-card-linha:nth-child(even) {
    background: #eeeeef;
}

.dia-card-hora {
    font-size: 13px;
    color: var(--resp-muted);
    font-weight: 800;
}

.dia-card-conteudo {
    font-size: 15px;
    font-weight: 800;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 7px;
}

.dia-card-professor {
    font-size: 12px;
    opacity: .88;
    font-weight: 600;
    margin-top: 3px;
}

.dia-card-bloqueado,
.horario-badge-bloqueado {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    background: var(--resp-danger);
    padding: 7px 10px;
    border-radius: 7px;
    display: inline-block;
}

.dia-card-emoji,
.horario-badge-emoji,
.horario-badge-vazio {
    font-size: 20px;
    line-height: 1;
    text-align: center;
    padding: 6px 0;
}

.dia-card-badge-wrap {
    display: inline-block;
    width: 100%;
    padding: 9px 11px;
    border-radius: 8px;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.08);
}

.tabela-wrap {
    overflow-x: auto;
    width: 100%;
}

.horario-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--resp-border);
    border-radius: var(--resp-radius);
    overflow: hidden;
    box-shadow: var(--resp-shadow-soft);
}

.horario-table th,
.horario-table td {
    border: 1px solid #e1e1e5;
    padding: 10px;
    text-align: center;
    vertical-align: middle;
}

.horario-table thead th {
    background: var(--resp-primary);
    font-size: 13px;
    font-weight: 800;
    color: #fff;
}

.horario-col-hora {
    background: #f3f4f6;
    font-size: 13px;
    font-weight: 800;
    color: #374151;
    min-width: 130px;
}

.horario-cell-aula {
    min-width: 140px;
}

.horario-badge-aula {
    display: inline-block;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    text-align: left;
    width: 100%;
}

.horario-badge-professor {
    display: block;
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
    opacity: .85;
}

/* Ausências */
.ausencias-wrap {
    padding: 6px 2px 12px;
}

.ausencias-resumo {
    background: #fff;
    border: 1px solid var(--resp-border);
    border-radius: var(--resp-radius);
    margin-bottom: 12px;
    box-shadow: var(--resp-shadow);
    overflow: hidden;
}

.ausencias-resumo-titulo {
    font-size: 18px;
    padding: 14px 16px;
    margin: 0;
}

.ausencias-resumo-info {
    font-size: 13px;
    color: var(--resp-muted);
    font-weight: 700;
    padding: 12px 16px;
    background: #fafafa;
}

.ausencia-card {
    background: #fff;
    border: 1px solid #dedee3;
    border-left: 6px solid var(--resp-danger);
    border-radius: var(--resp-radius);
    padding: 13px;
    margin-bottom: 12px;
    box-shadow: var(--resp-shadow-soft);
}

.ausencia-card-topo {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.ausencia-data {
    font-size: 17px;
    font-weight: 800;
    color: var(--resp-text);
}

.ausencia-dia {
    font-size: 12px;
    color: var(--resp-muted);
    font-weight: 700;
    margin-top: 2px;
}

.ausencia-badge {
    background: var(--resp-danger);
    color: #fff;
    border-radius: 7px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ausencia-badge:before {
    content: "\\f073";
    font-family: "Font Awesome 5 Free", "FontAwesome";
    font-weight: 900;
}

.ausencia-assunto {
    border-top: 1px solid #eeeeef;
    padding-top: 10px;
    font-size: 14px;
    color: #374151;
    line-height: 1.45;
}

.ausencia-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    background: var(--resp-primary);
    border-radius: 6px;
    padding: 4px 8px;
    margin-bottom: 7px;
}

.ausencia-label:before {
    content: "\\f071";
    font-family: "Font Awesome 5 Free", "FontAwesome";
    font-weight: 900;
}

.ausencias-vazio {
    background: #fff;
    border: 1px dashed #bfc3ca;
    border-radius: var(--resp-radius);
    padding: 18px;
    color: var(--resp-muted);
    font-size: 14px;
    text-align: center;
    font-weight: 800;
}

/* Ajustes mobile */
@media (max-width: 768px) {
    right-panel > .container-part[page-name=AusenciasAlunoSimpleList],
    right-panel > .container-part[page-name=AusenciasAlunoCards] {
        width: 100% !important;
    }

    .evento-timeline-page,
    .horario-wrap,
    .ausencias-wrap {
        padding: 6px;
    }

    .evento-page-header {
        padding: 14px;
    }

    .panel-title.card-title,
    .evento-page-title,
    .horario-turma-titulo,
    .ausencias-resumo-titulo {
        font-size: 17px;
    }

    .evento-timeline-list {
        padding: 8px;
    }

    .evento-row-card {
        gap: 8px;
        padding: 8px;
        border-radius: 8px;
    }

    .evento-row-date {
        flex: 0 0 74px;
    }

    .evento-desc {
        font-size: 13px;
    }

    .ausencia-card-topo {
        flex-direction: column;
    }

    .ausencia-badge {
        align-self: flex-start;
    }

    .dia-card-conteudo {
        font-size: 14px;
    }
}

@media (min-width: 768px) {
    .grade-mobile { display: none; }
    .grade-desktop { display: block; }
}
/* =========================================================
   Ajuste específico - Ausências do aluno no padrão Horários
   ========================================================= */
.ausencia-main-panel {
    margin-bottom: 0;
}

.ausencias-lista-calendario {
    padding: 10px;
    background: #fff;
}

.ausencia-row-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--resp-row);
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #dedee3;
    box-shadow: var(--resp-shadow-soft);
}

.ausencia-row-card:nth-child(even) {
    background: var(--resp-row-alt);
}

.ausencia-row-date {
    flex: 0 0 82px;
}

.ausencia-row-content {
    flex: 1;
    min-width: 0;
}

.ausencia-card {
    border-left: 1px solid #dedee3 !important;
}

.ausencia-aula-item {
    background: #fff;
    border: 1px solid #e1e1e5;
    border-radius: 8px;
    padding: 9px 10px;
    margin-bottom: 8px;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.04);
}

.ausencia-aula-item:last-child {
    margin-bottom: 0;
}

.ausencia-aula-topo {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.ausencia-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 28px;
    padding: 6px 9px;
    border-radius: 7px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.15;
    white-space: nowrap;
}

.ausencia-tag:before {
    font-family: "Font Awesome 5 Free", "FontAwesome";
    font-weight: 900;
    line-height: 1;
}

.ausencia-tag-horario {
    background: var(--resp-info);
}

.ausencia-tag-horario:before {
    content: "\f017";
}

.ausencia-tag-falta {
    background: #F44336;
}

.ausencia-tag-falta:before {
    content: "\f273";
}

.ausencia-aula-titulo {
    font-size: 14px;
    font-weight: 900;
    color: var(--resp-text);
    margin-bottom: 3px;
}

.ausencia-aula-descricao {
    font-size: 13px;
    color: #4b5563;
    font-weight: 650;
    line-height: 1.35;
    word-break: break-word;
}

@media (max-width: 768px) {
    .ausencias-lista-calendario {
        padding: 8px;
    }

    .ausencia-row-card {
        gap: 8px;
        padding: 8px;
    }

    .ausencia-row-date {
        flex: 0 0 74px;
    }

    .ausencia-aula-topo {
        align-items: stretch;
    }

    .ausencia-tag {
        flex: 1 1 130px;
        white-space: normal;
        text-align: center;
    }
}
