/* Escritorio: tarjeta centrada. No tocar si el PC ya se ve bien. */
.fi-simple-main {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 26rem !important;
    margin-inline: auto !important;
    margin-block: 4rem !important;
    padding: 2.5rem 2rem !important;
}

.fi-simple-header-heading {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
}

.fi-simple-main .fi-fo-field-label,
.fi-simple-main .fi-fo-field-label-content,
.fi-simple-main .fi-fo-field-label-content span,
.fi-simple-main .fi-checkbox-label,
.fi-simple-main label {
    font-size: 1rem !important;
    line-height: 1.4 !important;
}

.fi-simple-main .fi-link {
    font-size: 0.9375rem !important;
    line-height: 1.4 !important;
}

.fi-simple-main .fi-fo-field-label {
    flex-wrap: wrap;
    row-gap: 0.25rem;
}

.fi-simple-main .fi-input-wrp {
    min-height: 3rem !important;
}

html.dark .fi-simple-main .fi-input-wrp {
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.45) !important;
}

.fi-simple-main input.fi-input {
    font-size: 1.125rem !important;
    line-height: 1.4 !important;
    min-height: 3rem !important;
    padding-block: 0.75rem !important;
}

html.dark .fi-simple-main input.fi-input {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

html:not(.dark) .fi-simple-main input.fi-input {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
}

.fi-simple-main .fi-checkbox-input {
    width: 1.15rem;
    height: 1.15rem;
}

.fi-simple-main .fi-btn {
    width: 100% !important;
    min-height: 3rem !important;
    padding-inline: 1rem !important;
}

.fi-simple-main .fi-btn,
.fi-simple-main .fi-btn span {
    font-size: 1.125rem !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
}

.fi-simple-main .fi-btn.fi-color-primary,
.fi-simple-main .fi-btn.fi-color-primary span {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.fi-simple-main .fi-btn:not(.fi-color-primary),
.fi-simple-main .fi-btn:not(.fi-color-primary) span {
    color: #111827 !important;
    -webkit-text-fill-color: #111827 !important;
}

html.dark .fi-simple-main .fi-btn:not(.fi-color-primary),
html.dark .fi-simple-main .fi-btn:not(.fi-color-primary) span {
    color: #f9fafb !important;
    -webkit-text-fill-color: #f9fafb !important;
}

/*
 * Login en pantalla estrecha: tamaños en rem (nunca vw).
 * Chrome "sitio de escritorio" infla el viewport y 6vw se vuelve enorme.
 */
@media (max-width: 767px) {
    html.fi,
    body.fi-body,
    .fi-simple-layout,
    .fi-simple-main-ctn {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .fi-simple-main-ctn {
        padding: 0.75rem !important;
        align-items: stretch !important;
    }

    .fi-simple-main {
        width: 100% !important;
        max-width: 26rem !important;
        margin: 1.25rem auto !important;
        padding: 1.5rem 1.25rem !important;
        border-radius: 1rem !important;
    }

    .fi-simple-header-heading {
        font-size: 1.35rem !important;
    }

    .fi-simple-main .fi-fo-field-label,
    .fi-simple-main .fi-fo-field-label-content,
    .fi-simple-main .fi-fo-field-label-content span,
    .fi-simple-main .fi-checkbox-label,
    .fi-simple-main label {
        font-size: 1rem !important;
    }

    .fi-simple-main .fi-link {
        font-size: 0.9375rem !important;
    }

    .fi-simple-main .fi-input-wrp,
    .fi-simple-main input.fi-input {
        min-height: 3rem !important;
    }

    .fi-simple-main input.fi-input {
        font-size: 1rem !important;
        padding-block: 0.75rem !important;
    }

    .fi-simple-main .fi-btn {
        min-height: 3rem !important;
    }

    .fi-simple-main .fi-btn,
    .fi-simple-main .fi-btn span {
        font-size: 1.0625rem !important;
    }

    .fi-simple-main .fi-checkbox-input {
        width: 1.15rem !important;
        height: 1.15rem !important;
    }

    .fi-simple-header .fi-logo,
    .fi-simple-header .fi-logo img {
        max-width: 8.5rem !important;
        max-height: 5.5rem !important;
        height: auto !important;
    }
}

/* Login: logo grande. Panel: logo en el menú, sin barra superior. */
.fi-simple-header .fi-logo {
    height: auto !important;
    max-height: none !important;
}

.fi-simple-header .fi-logo img {
    height: auto !important;
    max-width: min(70vw, 10rem) !important;
    max-height: 6.5rem !important;
    margin-inline: auto;
}

@media (min-width: 1024px) {
    html:not(.school-phone) .fi-topbar-ctn {
        display: none !important;
    }

    html:not(.school-phone) body.fi-body-has-topbar .fi-sidebar {
        top: 0 !important;
        height: 100dvh !important;
    }

    html:not(.school-phone) body.fi-body-has-navigation {
        overflow: hidden;
        height: 100dvh;
    }

    html:not(.school-phone) body.fi-body-has-navigation .fi-layout {
        height: 100dvh;
        overflow: hidden;
    }

    html:not(.school-phone) body.fi-body-has-navigation .fi-main-ctn {
        min-height: 0 !important;
        height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
    }
}

body.fi-body-has-navigation:not(.fi-body-has-topbar) .fi-sidebar-nav {
    scrollbar-gutter: auto;
}

.fi-sidebar-header {
    height: auto !important;
    min-height: 0 !important;
    flex-direction: column;
    padding: 1.25rem 0.75rem 0.35rem !important;
}

.fi-sidebar-header-logo-ctn {
    display: flex !important;
    width: 100%;
    justify-content: center;
}

.fi-sidebar .fi-logo {
    display: flex !important;
    height: auto !important;
    width: 100%;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
}

.fi-sidebar .fi-logo img {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 7.5rem !important;
    max-height: 7.5rem !important;
    object-fit: contain;
}

.school-sidebar-toggle-wrap {
    display: none;
}

@media (min-width: 1024px) {
    html:not(.school-phone) .fi-sidebar-open-collapse-sidebar-btn,
    html:not(.school-phone) .fi-sidebar-close-collapse-sidebar-btn,
    html:not(.school-phone) .fi-topbar-collapse-sidebar-btn-ctn {
        display: none !important;
    }

    /* El wrapper de Livewire es el que ocupa sitio en el flex, no solo .fi-sidebar */
    html:not(.school-phone) .fi-layout > div:has(> .fi-sidebar) {
        flex: 0 0 var(--sidebar-width);
        width: var(--sidebar-width);
        max-width: var(--sidebar-width);
        min-width: 0;
    }

    html:not(.school-phone) .fi-layout > div:has(> .fi-sidebar:not(.fi-sidebar-open)) {
        flex-basis: var(--collapsed-sidebar-width);
        width: var(--collapsed-sidebar-width);
        max-width: var(--collapsed-sidebar-width);
        overflow: visible;
        z-index: 40;
    }

    html:not(.school-phone) .fi-sidebar:not(.fi-sidebar-open),
    html:not(.school-phone) .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-footer,
    html:not(.school-phone) .fi-sidebar:not(.fi-sidebar-open) .fi-user-menu,
    html:not(.school-phone) .fi-sidebar:not(.fi-sidebar-open) .fi-dropdown {
        overflow: visible !important;
    }

    html:not(.school-phone) .fi-sidebar:not(.fi-sidebar-open) .fi-dropdown-panel {
        min-width: 14rem !important;
        max-width: 16rem !important;
        width: 14rem !important;
        z-index: 60 !important;
    }

    html:not(.school-phone) .fi-sidebar.fi-sidebar-open,
    html:not(.school-phone) .fi-sidebar:not(.fi-sidebar-open) {
        width: 100% !important;
        translate: none !important;
    }

    html:not(.school-phone) body.fi-body-has-navigation .fi-main {
        max-width: none !important;
        width: 100% !important;
        min-width: 0;
        margin-inline: 0 !important;
        box-sizing: border-box;
    }

    html:not(.school-phone) .fi-main-ctn,
    html:not(.school-phone) .fi-page,
    html:not(.school-phone) .fi-page-content {
        min-width: 0;
        max-width: 100%;
    }

    html:not(.school-phone) .fi-main-ctn:not(.fi-main-ctn-sidebar-open) .fi-main {
        padding-inline-start: 1rem;
    }

    html:not(.school-phone) .fi-account-widget {
        width: 100% !important;
        max-width: none !important;
    }

    html:not(.school-phone) .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-header {
        padding: 0.75rem 0.4rem 0.25rem !important;
    }

    html:not(.school-phone) .fi-sidebar:not(.fi-sidebar-open) .fi-logo img {
        max-width: 2.35rem !important;
        max-height: 2.35rem !important;
    }

    html:not(.school-phone) .fi-sidebar-nav {
        gap: 0.15rem !important;
        padding-block: 0.2rem 1rem !important;
        padding-inline: 0.75rem !important;
    }

    html:not(.school-phone) .fi-sidebar-nav-groups {
        margin-inline: 0;
        gap: 0.15rem !important;
    }

    html:not(.school-phone) .school-sidebar-toggle-wrap {
        display: block;
        margin-bottom: 0.1rem;
    }

    html:not(.school-phone) .school-sidebar-toggle {
        display: flex;
        width: 100%;
        align-items: center;
        gap: 0.75rem;
        margin: 0;
        padding: 0.5rem;
        border: 0;
        border-radius: 0.5rem;
        background: transparent;
        color: #374151;
        cursor: pointer;
        text-align: start;
    }

    html.dark:not(.school-phone) .school-sidebar-toggle {
        color: #e5e7eb;
    }

    html:not(.school-phone) .school-sidebar-toggle:hover {
        background: #f3f4f6;
        color: #6b3aa8;
    }

    html.dark:not(.school-phone) .school-sidebar-toggle:hover {
        background: rgb(255 255 255 / 0.05);
        color: #c4b5fd;
    }

    html:not(.school-phone) .school-sidebar-toggle-icon {
        display: flex;
        width: 1.5rem;
        height: 1.5rem;
        flex-shrink: 0;
        align-items: center;
        justify-content: center;
        font-size: 1.35rem;
        line-height: 1;
        font-weight: 700;
    }

    html:not(.school-phone) .school-sidebar-toggle-label {
        flex: 1;
        font-size: 0.875rem;
        font-weight: 500;
        line-height: 1.5;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

.fi-sidebar-item.fi-collapsible {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.school-sidebar-item-main {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.school-sidebar-item-main > .fi-sidebar-item-btn {
    flex: 1;
    min-width: 0;
}

.school-sidebar-item-collapse-btn,
.fi-sidebar-group-collapse-btn {
    flex-shrink: 0;
    margin-inline-end: 0.15rem;
    transition: transform 0.2s ease;
    rotate: 0deg !important;
}

.fi-sidebar-group.fi-collapsed .fi-sidebar-group-collapse-btn {
    transform: none !important;
}

.fi-sidebar-item.fi-collapsible:not(.fi-collapsed) > .school-sidebar-item-main > .school-sidebar-item-collapse-btn,
.fi-sidebar-group:not(.fi-collapsed) > .fi-sidebar-group-btn > .fi-sidebar-group-collapse-btn {
    transform: rotate(90deg) !important;
}

/* Formularios y listados a ancho completo, sin scroll lateral */
.fi-main .fi-sc,
.fi-main .fi-section,
.fi-main .fi-ta-ctn,
.fi-main .fi-ta-main,
.fi-main .fi-ta-content-ctn,
.fi-main .fi-ta-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.fi-main .fi-ta-ctn,
.fi-main .fi-ta-content-ctn {
    overflow-x: auto;
}

.fi-main .fi-ta-table {
    width: 100%;
    max-width: 100%;
    table-layout: auto;
}

.fi-main .fi-ta-table > tbody {
    white-space: normal;
}

.fi-main .fi-ta-header-cell,
.fi-main .fi-ta-cell {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.fi-main .fi-ta-text {
    overflow-wrap: anywhere;
    white-space: normal;
}

.fi-main .fi-ta-actions-header-cell,
.fi-main .fi-ta-cell:has(.fi-ta-actions) {
    width: 6.75rem;
    min-width: 6.75rem;
    max-width: 8.5rem;
    overflow: visible;
    white-space: normal;
}

.fi-main .fi-ta-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 100%;
}

.fi-main .fi-sc-actions .fi-ac {
    justify-content: center;
}

.school-date-centered .fi-fo-date-time-picker-display-text-input {
    text-align: center;
}

.school-created-by.fi-in-text {
    line-height: 1.25;
}

.school-created-by .school-created-at {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
}

.school-radio-centered .fi-fo-field-label-ctn,
.school-radio-centered .fi-fo-field-label {
    justify-content: center;
}

.school-radio-centered .fi-fo-field-label-content {
    text-align: center;
}

.school-radio-centered .fi-fo-radio.fi-inline {
    justify-content: center;
    min-height: 2.5rem;
    align-items: center;
}

.fi-section-header-after-ctn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.fi-section-header-after-ctn .fi-fo-field {
    margin: 0;
}

.fi-section-header-after-ctn .fi-fo-placeholder {
    color: #b45309;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.school-web-access-section:not(:has(.fi-section-content > :not(.fi-hidden))) > .fi-section-content-ctn {
    display: none;
}

.school-menus {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
}

.school-menus .fi-section {
    width: 100%;
}

.school-menus .fi-section-header {
    align-items: center;
}

.school-menus .fi-section-header-heading {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.school-gender .fi-fo-radio {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    align-items: flex-start;
}

.school-gender .fi-fo-radio-label {
    align-items: center;
}

.school-gender .fi-fo-radio-label-text {
    width: 2.85rem;
    height: 0.9rem;
    overflow: hidden;
    font-size: 0;
    line-height: 0;
    color: transparent;
    border-radius: 2px;
}

.school-gender .fi-fo-radio-label:nth-child(1) .fi-fo-radio-label-text {
    background: #2563eb;
}

.school-gender .fi-fo-radio-label:nth-child(2) .fi-fo-radio-label-text {
    background: #ec4899;
}

.school-student-meta > .fi-sc {
    align-items: stretch;
}

.school-student-meta .fi-sc-section,
.school-student-meta .fi-sc-component {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.school-student-meta .fi-section {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
}

.school-student-meta .fi-section-content-ctn,
.school-student-meta .fi-section-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.school-student-meta-stack {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.school-student-meta-stack > .fi-sc {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
    min-height: 0;
    align-items: stretch;
}

.school-student-meta-stack > .fi-sc > .fi-sc-component {
    flex: 1 1 0;
    min-height: 0;
    height: auto;
}

.school-schedule-slot.fi-in-text,
.school-schedule-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    font-weight: 700;
    color: #6b3aa8;
}

.school-student-meta-fill .fi-section-content > .fi-sc-component,
.school-student-meta-fill .fi-fo-field,
.school-student-meta-fill .fi-fo-field-content,
.school-student-meta-fill .fi-fo-field-content-col {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.school-student-meta-fill .fi-input-wrp {
    flex: 1;
    align-items: stretch;
}

.school-student-meta-fill .fi-input-wrp .fi-input {
    height: 100%;
    min-height: 4.75rem;
}

.school-student-meta-fill .fi-fo-textarea-wrp {
    flex: 1;
    align-items: stretch;
    display: flex;
}

.school-student-meta-fill .fi-fo-textarea-wrp textarea {
    flex: 1;
    height: 100%;
    min-height: 8rem;
    resize: none;
}

.school-extras-repeater.fi-fo-table-repeater > table {
    display: table !important;
    width: 100%;
    table-layout: auto;
}

.school-extras-repeater.fi-fo-table-repeater > table > thead {
    display: none !important;
}

.school-extras-repeater.fi-fo-table-repeater > table > tbody {
    display: table-row-group !important;
}

.school-extras-repeater.fi-fo-table-repeater > table > tbody > tr {
    display: table-row !important;
    padding: 0 !important;
}

.school-extras-repeater.fi-fo-table-repeater > table > tbody > tr > td {
    display: table-cell !important;
    vertical-align: middle;
    padding: 0.35rem 0.75rem !important;
}

.school-extras-repeater.fi-fo-table-repeater > table > thead > tr > th:last-child,
.school-extras-repeater.fi-fo-table-repeater > table > tbody > tr > td:last-child {
    width: 4.75rem;
    white-space: nowrap;
    text-align: end;
}

.school-extras-repeater.fi-fo-table-repeater .fi-fo-table-repeater-actions {
    justify-content: flex-end;
    padding: 0 !important;
}

.school-report {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.school-report-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
}

.school-report-empty {
    margin: 0;
    color: #6b7280;
}

.school-report-heading {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: #6b3aa8;
}

.school-report-table-wrap {
    overflow-x: auto;
}

.school-report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.school-report-table th,
.school-report-table td {
    border: 1px solid #e5e7eb;
    padding: 0.35rem 0.6rem;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
    height: 2.75rem;
    line-height: 1.25;
}

.school-report-table th {
    background: #f3eef8;
    font-weight: 700;
    height: auto;
}

.school-report-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.school-report-table td.school-report-times {
    white-space: normal;
    line-height: 1.15;
}

.school-tutor-repeater.fi-fo-repeater .fi-fo-repeater-item {
    position: relative;
}

.school-tutor-repeater.fi-fo-repeater .fi-fo-repeater-item-content {
    padding-top: 0.35rem;
}

.school-tutor-repeater .school-tutor-card.fi-sc-section,
.school-tutor-repeater .school-tutor-card .fi-section {
    background: transparent;
    box-shadow: none;
}

.school-tutor-repeater .school-tutor-card .fi-section-header {
    position: absolute;
    top: 0;
    inset-inline-end: 6.25rem;
    width: auto;
    height: 3.25rem;
    margin: 0;
    padding: 0 0.25rem 0 0;
    border: 0;
    background: transparent;
    z-index: 2;
}

.school-tutor-repeater .school-tutor-card .fi-section-content-ctn {
    border: 0;
}

.school-tutor-repeater .school-tutor-card .fi-section-content {
    padding: 0.35rem 0 0;
}

.school-report-extras {
    align-items: end;
}

.school-report-extras .fi-fo-field {
    gap: 0;
}

.school-control-table th {
    text-align: center;
    white-space: pre-line;
    line-height: 1.15;
    font-size: 0.75rem;
}

.school-control-table td.school-control-mark {
    min-width: 2.4rem;
    height: 2.1rem;
    background: #fff;
}

.school-report-table-wrap.is-temperature-wrap {
    overflow-x: hidden;
}

.school-control-table.is-temperature {
    table-layout: fixed;
    width: 100%;
}

.school-control-table.is-temperature th {
    white-space: pre-line;
    line-height: 1.15;
    min-width: 0;
    padding: 0.2rem 0.1rem;
    font-size: 0.68rem;
}

.school-control-table.is-temperature td {
    min-width: 0;
    padding: 0.2rem 0.15rem;
    font-size: 0.7rem;
}

.school-control-table.is-temperature th.is-name,
.school-control-table.is-temperature td.is-name {
    width: 4.5rem;
    white-space: nowrap;
    font-size: 0.8rem;
}

.school-control-table.is-temperature td.school-control-mark {
    min-width: 0;
    width: auto;
    height: 2.4rem;
    padding: 0.15rem;
}

.school-control-table.is-temperature th.is-day-group {
    font-size: 0.75rem;
    white-space: nowrap;
}

.school-control-table.is-temperature th.is-am,
.school-control-table.is-temperature th.is-pm,
.school-control-table.is-temperature td.is-am,
.school-control-table.is-temperature td.is-pm {
    min-width: 0;
    width: auto;
    text-align: center;
}

.school-report-section + .school-report-section {
    margin-top: 1.25rem;
}

.school-control-table.is-temperature th.is-pm,
.school-control-table.is-temperature td.is-pm {
    background: #f8f5fb;
}

.school-report-legend {
    margin: -0.35rem 0 0.75rem;
    color: #6b7280;
    font-size: 0.85rem;
}

.school-control-table.is-monthly {
    table-layout: fixed;
    width: 100%;
}

.school-control-table.is-monthly th,
.school-control-table.is-monthly td {
    min-width: 0;
    padding: 0.2rem 0.12rem;
    font-size: 0.68rem;
}

.school-control-table.is-monthly col.col-name {
    width: 24%;
}

.school-control-table.is-monthly col.col-mark {
    width: auto;
}

.school-control-table.is-monthly th.is-name,
.school-control-table.is-monthly td.is-name {
    width: 24%;
    min-width: 12rem;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
    text-align: left;
    font-size: 0.78rem;
    line-height: 1.25;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
}

.school-control-table.is-monthly th.is-mark,
.school-control-table.is-monthly td.is-mark {
    text-align: center;
}

.school-control-table.is-monthly td.school-control-mark {
    min-width: 0;
    height: 2.1rem;
}

.monthly-name-cell {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.monthly-name-cell input {
    flex: none;
    width: 0.95rem;
    height: 0.95rem;
    margin: 0;
    accent-color: #6b3aa8;
    cursor: pointer;
}

.monthly-name-cell span {
    min-width: 0;
}

.monthly-name-cell.is-excluded span {
    color: #9ca3af;
    text-decoration: line-through;
}

.school-control-table.is-monthly tr.is-monthly-excluded td.school-control-mark {
    background: #f9fafb;
}

.monthly-add-row {
    appearance: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: #6b3aa8;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.monthly-add-row:hover {
    text-decoration: underline;
}

.school-control-table.is-extras {
    table-layout: fixed;
    width: 100%;
}

.school-control-table.is-extras col.col-name { width: 32%; }
.school-control-table.is-extras col.col-date { width: 13%; }
.school-control-table.is-extras col.col-time { width: 11.5%; }
.school-control-table.is-extras col.col-meal { width: 10.5%; }

.school-control-table.is-extras td.school-control-mark {
    min-width: 0;
    height: 2.5rem;
}

.school-control-table.is-extras th,
.school-control-table.is-extras td {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

.school-control-table.is-extras th {
    overflow: visible;
}

.school-control-table.is-extras td {
    overflow: hidden;
}

.school-control-table.is-extras .is-name {
    min-width: 0;
    text-align: left;
    padding-left: 0.6rem;
    padding-right: 0.6rem;
}

.school-control-table.is-extras .is-date,
.school-control-table.is-extras .is-time,
.school-control-table.is-extras .is-meal {
    min-width: 0;
    text-align: center;
}

.school-control-table .is-weekend {
    background: #f3f4f6;
}

@media (max-width: 639px) {
    .school-report-extras-spacer {
        display: none;
    }
}

.school-agenda-contact p {
    margin: 0 0 0.85rem;
    line-height: 1.4;
}

.school-agenda-sheet,
.school-agenda-calendar,
.school-agenda-students,
.school-agenda-gallery {
    width: 100%;
    max-width: none;
}

.school-agenda-sheet-head,
.school-agenda-calendar-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
}

.school-agenda-sheet-name {
    margin: 0;
    color: #6b3aa8;
    font-size: 1.15rem;
    font-weight: 700;
    text-transform: uppercase;
}

.school-agenda-sheet-date {
    margin: 0.15rem 0 0;
    color: #4b5563;
}

.school-agenda-sheet-nav,
.school-agenda-calendar-nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.school-agenda-icon-btn,
.school-agenda-calendar-nav button,
.school-agenda-save,
.school-agenda-chat-form button,
.school-agenda-day-link {
    min-height: 2.75rem;
    padding: 0.45rem 0.85rem;
    border-radius: 0.6rem;
    font-weight: 700;
    text-decoration: none;
}

.school-agenda-icon-btn,
.school-agenda-calendar-nav button {
    border: 1px solid #6b3aa8;
    background: #6b3aa8;
    color: #fff;
}

.school-agenda-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.9rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.school-agenda-card h3 {
    margin: 0 0 0.75rem;
    color: #6b3aa8;
}

.school-agenda-blocks {
    display: flex;
    flex-wrap: wrap;
    align-items: start;
    justify-content: space-between;
    gap: 1.25rem 2rem;
    margin-bottom: 1rem;
}

.school-agenda-block {
    flex: 0 1 auto;
}

.school-agenda-block-sleep {
    flex: 1 1 16rem;
    min-width: 0;
}

.school-agenda-block-bowel {
    flex: 0 0 auto;
    width: max-content;
    min-width: 0;
}

.school-agenda-block-meals {
    flex: 1 1 14rem;
    min-width: 0;
}

.school-agenda-meals {
    display: grid;
    grid-template-columns: 5.75rem repeat(4, minmax(3.5rem, 1fr));
    column-gap: 0.15rem;
    row-gap: 0.2rem;
    align-items: center;
}

.school-agenda-meals-head,
.school-agenda-meals-row {
    display: contents;
}

.school-agenda-meals-head span,
.school-agenda-meals-row span {
    font-size: 0.8rem;
    line-height: 1.15;
    color: #111827;
}

.school-agenda-meals-head span:first-child,
.school-agenda-meals-row > span {
    justify-self: start;
    text-align: left;
}

.school-agenda-meals-head span:not(:first-child) {
    width: 100%;
    text-align: center;
}

.school-agenda-meals-row label {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 2.5rem;
}

.school-agenda-meals-row input,
.school-agenda-yesno-grid input[type="radio"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: #6b3aa8;
}

@media (min-width: 1100px) {
    html:not(.school-phone) .school-agenda-blocks {
        flex-wrap: nowrap;
    }

    html:not(.school-phone) .school-agenda-block-sleep {
        min-width: 22rem;
    }
}

.school-agenda-yesno-grid {
    display: grid;
    grid-template-columns: 4.75rem 2.75rem 2.75rem;
    column-gap: 0.35rem;
    row-gap: 0.2rem;
    align-items: center;
    justify-items: center;
}

.school-agenda-yesno-grid-sleep {
    grid-template-columns: 4.75rem 2.75rem 2.75rem minmax(0, 1fr);
}

.school-agenda-yesno-grid > span {
    font-size: 0.85rem;
    color: #111827;
}

.school-agenda-yesno-grid > .is-label {
    justify-self: start;
    text-align: left;
}

.school-agenda-yesno-grid > label {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 2.5rem;
    width: 100%;
}

.school-agenda-sleep-range {
    display: flex;
    gap: 0.75rem;
    flex-wrap: nowrap;
    justify-content: center;
    justify-self: stretch;
    align-items: center;
    min-height: 2.5rem;
    white-space: nowrap;
}

.school-agenda-sleep-range label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: auto;
    min-height: 2.75rem;
    flex-shrink: 0;
    font-size: 1rem;
}

.school-agenda-sleep-range input[type="time"] {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    width: 7.75rem;
    min-width: 7.75rem;
    max-width: 7.75rem;
    min-height: 2.75rem;
    height: 2.75rem;
    padding: 0.2rem 0.4rem;
    flex-shrink: 0;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    color: #111827;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 0.45rem;
    color-scheme: light;
}

.school-agenda-sleep-range input[type="time"]::-webkit-datetime-edit,
.school-agenda-sleep-range input[type="time"]::-webkit-datetime-edit-fields-wrapper,
.school-agenda-sleep-range input[type="time"]::-webkit-datetime-edit-hour-field,
.school-agenda-sleep-range input[type="time"]::-webkit-datetime-edit-minute-field,
.school-agenda-sleep-range input[type="time"]::-webkit-datetime-edit-text {
    padding: 0;
    min-width: 0;
    width: auto;
    font-size: 1.125rem;
    font-weight: 700;
    text-align: center;
    color: #111827;
    -webkit-text-fill-color: #111827;
}

.school-agenda-sleep-range input[type="time"]::-webkit-datetime-edit {
    flex: 1 1 auto;
}

.school-agenda-sleep-range input[type="time"]::-webkit-datetime-edit-fields-wrapper {
    display: inline-flex;
    justify-content: center;
    width: 100%;
}

.school-agenda-sleep-range input[type="time"]::-webkit-calendar-picker-indicator {
    margin: 0;
    margin-inline-start: 0.1rem;
    cursor: pointer;
    opacity: 1;
    width: 1.15rem;
    height: 1.15rem;
    padding: 0;
    flex-shrink: 0;
}

.school-agenda-text textarea {
    width: 100%;
    margin-bottom: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.6rem;
    padding: 0.7rem 0.8rem;
    min-height: 4.5rem;
    font: inherit;
}

.school-agenda-save,
.school-agenda-chat-form button {
    border: 1px solid #6b3aa8;
    background: #fff;
    color: #6b3aa8;
}

.school-agenda-card.is-readonly input,
.school-agenda-card.is-readonly textarea {
    pointer-events: none;
    cursor: default;
    background: #f9fafb;
}

.school-agenda-banner {
    background: #f59e0b;
    color: #111827;
    font-weight: 700;
    padding: 0.6rem 0.8rem;
    border-radius: 0.4rem;
}

.school-agenda-chat {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin: 0.75rem 0;
}

.school-agenda-chat-item {
    border-radius: 0.7rem;
    padding: 0.6rem 0.75rem;
    background: #f3eef8;
}

.school-agenda-chat-item.is-staff {
    background: #eef2ff;
}

.school-agenda-chat-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.75rem;
}

.school-agenda-chat-meta span {
    color: #6b7280;
    font-size: 0.85rem;
}

.school-agenda-chat-item p {
    margin: 0.25rem 0 0;
}

.school-agenda-chat-form {
    display: flex;
    gap: 0.5rem;
}

.school-agenda-chat-form input {
    flex: 1;
    min-height: 2.75rem;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 0 1rem;
    font: inherit;
}

.school-agenda-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    background: #e5e7eb;
    border: 1px solid #e5e7eb;
}

.school-agenda-calendar-toolbar h2 {
    margin: 0;
    color: #111827;
}

.school-agenda-calendar-dow,
.school-agenda-calendar-day {
    background: #fff;
    color: #111827;
    min-height: 5.5rem;
    padding: 0.35rem;
}

.school-agenda-calendar-dow {
    min-height: 0;
    font-weight: 700;
    text-align: center;
}

.school-agenda-calendar-day {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.school-agenda-calendar-day.is-outside,
.school-agenda-calendar-day.is-weekend {
    background: #f9fafb;
    color: #9ca3af;
}

.school-agenda-day-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    border: 1px solid transparent;
}

.school-agenda-day-link.is-filled {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

.school-agenda-day-link.is-empty {
    background: #fff;
    border-color: #9ca3af;
    color: #9ca3af;
}

.school-agenda-day-link-short {
    display: none;
}

.school-agenda-dow-short {
    display: none;
}

.school-agenda-calendar-back {
    margin-top: 1rem;
}

.school-agenda-photo-classes {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
    width: 100%;
}

.school-agenda-photo-class {
    appearance: none;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.35rem;
    box-shadow: 0 2px 8px rgb(15 23 42 / 0.08);
    padding: 0.85rem 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    cursor: pointer;
    font: inherit;
    color: inherit;
    min-width: 0;
}

.school-agenda-photo-class-media {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 0.35rem;
    background: #f3f4f6;
}

.school-agenda-photo-class-cover {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.school-agenda-photo-class:hover,
.school-agenda-photo-class:focus-visible {
    border-color: #c4b5fd;
    outline: none;
}

.school-agenda-photo-stack {
    position: relative;
    width: 7.5rem;
    height: 6.5rem;
}

.school-agenda-photo-stack > span {
    position: absolute;
    left: 50%;
    width: 5.5rem;
    height: 5.5rem;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 0.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}

.school-agenda-photo-stack > span:nth-child(1) {
    top: 0;
    transform: translateX(-50%) rotate(-8deg);
}

.school-agenda-photo-stack > span:nth-child(2) {
    top: 0.35rem;
    transform: translateX(-50%) rotate(7deg);
}

.school-agenda-photo-stack > span:nth-child(3) {
    top: 0.7rem;
    transform: translateX(-50%);
    background: #eceff3;
}

.school-agenda-photo-stack svg {
    width: 2.4rem;
    height: 2.4rem;
}

.school-agenda-photo-class-name {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    text-align: center;
    color: #111827;
}

.school-agenda-photo-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0 0 1rem;
}

.school-agenda-photo-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.school-agenda-photo-back-btn,
.school-agenda-photo-download-all,
.school-agenda-photo-download,
.school-agenda-photo-delete,
.school-agenda-photo-camera {
    background: none;
    border: 0;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.school-agenda-photo-back-btn,
.school-agenda-photo-download,
.school-agenda-photo-download-all,
.school-agenda-photo-camera {
    color: #6b3aa8;
}

.school-agenda-photo-download-all,
.school-agenda-photo-download,
.school-agenda-photo-camera {
    min-height: 2.75rem;
    padding: 0.45rem 0.85rem;
    border-radius: 0.6rem;
    border: 1px solid #6b3aa8;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.school-agenda-photo-camera {
    position: relative;
    overflow: hidden;
}

.school-agenda-photo-camera input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 0;
    border: 0;
}

.school-agenda-photo-delete {
    min-height: 2.4rem;
    padding: 0.35rem 0.7rem;
    color: #b91c1c;
}

.school-agenda-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: 1rem;
}

.school-agenda-gallery-grid figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
}

.school-agenda-gallery-thumb {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    border-radius: 0.6rem;
    overflow: hidden;
}

.school-agenda-gallery-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.school-agenda-gallery-item-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
}

.school-agenda-gallery-item-actions .school-agenda-photo-download,
.school-agenda-gallery-item-actions .school-agenda-photo-delete {
    min-height: 2.25rem;
    padding: 0.3rem 0.65rem;
    font-size: 0.85rem;
}

.school-agenda-lightbox {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgb(15 23 42 / 0.72);
}

.school-agenda-lightbox-inner {
    position: relative;
    width: min(72rem, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 3rem;
}

.school-agenda-lightbox-close {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #111827;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.school-agenda-carousel {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.school-agenda-carousel-frame {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111827;
    border-radius: 0.9rem;
    min-height: 18rem;
    max-height: min(78vh, 40rem);
    overflow: hidden;
}

.school-agenda-carousel-frame img {
    display: block;
    width: 100%;
    height: auto;
    max-height: min(78vh, 40rem);
    object-fit: contain;
}

.school-agenda-carousel-nav {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    border: 1px solid #fff;
    background: #6b3aa8;
    color: #fff;
    font-size: 1.7rem;
    line-height: 1;
    cursor: pointer;
}

.school-agenda-carousel-nav:disabled {
    opacity: 0.35;
    cursor: default;
}

.school-agenda-carousel-actions {
    display: flex;
    justify-content: center;
    margin-top: 0.85rem;
}

html.dark .school-agenda-sheet-name,
html.dark .school-agenda-card h3,
html.dark .school-agenda-photo-back-btn,
html.dark .school-agenda-photo-download,
html.dark .school-agenda-photo-download-all,
html.dark .school-agenda-photo-camera {
    color: #c4b5fd;
}

html.dark .school-agenda-sheet-date,
html.dark .school-agenda-chat-empty,
html.dark .school-agenda-calendar-back a,
html.dark .school-agenda-chat-meta span {
    color: #d1d5db;
}

html.dark .school-agenda-card,
html.dark .school-agenda-photo-class {
    background: #1f2937;
    border-color: rgb(255 255 255 / 0.12);
    color: #f3f4f6;
}

html.dark .school-agenda-meals-head span,
html.dark .school-agenda-meals-row span,
html.dark .school-agenda-yesno-grid > span,
html.dark .school-agenda-sleep-range,
html.dark .school-agenda-sleep-range label,
html.dark .school-agenda-photo-class-name,
html.dark .school-agenda-calendar-toolbar h2 {
    color: #f3f4f6;
}

html.dark .school-agenda-text textarea,
html.dark .school-agenda-chat-form input,
html.dark .school-agenda-sleep-range input[type="time"] {
    background: #111827;
    border-color: rgb(255 255 255 / 0.18);
    color: #f9fafb;
    color-scheme: dark;
}

html.dark .school-agenda-sleep-range input[type="time"]::-webkit-datetime-edit,
html.dark .school-agenda-sleep-range input[type="time"]::-webkit-datetime-edit-fields-wrapper,
html.dark .school-agenda-sleep-range input[type="time"]::-webkit-datetime-edit-hour-field,
html.dark .school-agenda-sleep-range input[type="time"]::-webkit-datetime-edit-minute-field,
html.dark .school-agenda-sleep-range input[type="time"]::-webkit-datetime-edit-text {
    color: #f9fafb;
    -webkit-text-fill-color: #f9fafb;
}

html.dark .school-agenda-save,
html.dark .school-agenda-chat-form button,
html.dark .school-agenda-photo-download-all,
html.dark .school-agenda-photo-download,
html.dark .school-agenda-photo-camera,
html.dark .school-agenda-day-link.is-empty {
    background: #111827;
    border-color: #c4b5fd;
    color: #c4b5fd;
}

html.dark .school-agenda-chat-item {
    background: rgb(109 40 217 / 0.22);
    color: #f3f4f6;
}

html.dark .school-agenda-chat-item.is-staff {
    background: rgb(99 102 241 / 0.22);
}

html.dark .school-agenda-calendar-grid {
    background: rgb(255 255 255 / 0.12);
    border-color: rgb(255 255 255 / 0.12);
}

html.dark .school-agenda-calendar-dow,
html.dark .school-agenda-calendar-day {
    background: #1f2937;
    color: #f3f4f6;
}

html.dark .school-agenda-calendar-day.is-outside,
html.dark .school-agenda-calendar-day.is-weekend {
    background: #111827;
    color: #9ca3af;
}

html.dark .school-agenda-day-link.is-filled {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

html.dark .school-agenda-photo-class-media,
html.dark .school-agenda-photo-stack > span {
    background: #111827;
    border-color: rgb(255 255 255 / 0.12);
}

html.dark .school-agenda-banner {
    color: #111827;
}

html.dark .school-agenda-contact p {
    color: #e5e7eb;
}

.school-agenda-chat-item {
    scroll-margin-top: 4.5rem;
}

.school-dash-comments {
    overflow: hidden;
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 1px 3px rgb(15 23 42 / 0.08);
    border: 1px solid #e5e7eb;
}

.school-dash-comments-head {
    margin: 0;
    padding: 0.7rem 1.1rem;
    background: #e8781f;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.school-dash-comment {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 0.85rem 1.1rem;
    border-top: 1px solid #ececec;
    text-decoration: none;
    color: inherit;
}

.school-dash-comment:hover {
    background: #fffaf5;
}

.school-dash-comment-main {
    min-width: 0;
    flex: 1 1 auto;
}

.school-dash-comment-text {
    margin: 0;
    min-width: 0;
    flex: 1 1 auto;
    line-height: 1.4;
}

.school-dash-comment-parent {
    font-weight: 700;
    color: #111827;
}

.school-dash-comment-student {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    margin-inline: 0.2rem;
    color: #e8781f;
    font-weight: 700;
}

.school-dash-comment-baby {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}

.school-dash-comment-said {
    color: #111827;
}

.school-dash-comment-body {
    font-style: italic;
    color: #6b5e52;
}

.school-dash-comment-when {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
    margin: 0;
    flex-shrink: 0;
    color: #9ca3af;
    font-size: 0.9rem;
    line-height: 1.25;
    text-align: right;
    white-space: nowrap;
}

.school-dash-comments-empty {
    margin: 0;
    padding: 1rem 1.1rem;
    color: #6b7280;
    border-top: 1px solid #ececec;
}

html.dark .school-dash-comments {
    background: #1f2937;
    border-color: rgb(255 255 255 / 0.1);
}

html.dark .school-dash-comment {
    border-top-color: rgb(255 255 255 / 0.08);
}

html.dark .school-dash-comment:hover {
    background: rgb(255 255 255 / 0.04);
}

html.dark .school-dash-comment-parent,
html.dark .school-dash-comment-said {
    color: #f3f4f6;
}

html.dark .school-dash-comment-body {
    color: #d1d5db;
}

html.dark .school-dash-comments-empty {
    color: #9ca3af;
    border-top-color: rgb(255 255 255 / 0.08);
}
