body .entry-content,
body .wp-site-blocks,
body main,
body .is-layout-constrained,
body .wp-block-post-content {
    max-width: none !important;
}

body .entry-content > *,
body .wp-block-post-content > * {
    max-width: none !important;
}

header.wp-block-template-part,
footer.wp-block-template-part {
    display: none !important;
}

.cuaderno-app-shell,
.cuaderno-app-shell * {
    box-sizing: border-box;
}

.cuaderno-app-shell {
    width: min(1400px, calc(100vw - 48px));
    max-width: none;
    min-height: 76vh;
    margin: 16px auto 32px;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    background: #eef4fb;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(21, 35, 70, 0.10);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.cuaderno-sidebar {
    background: #070b1a;
    color: white;
    padding: 34px 24px;
    display: flex;
    flex-direction: column;
}

.cuaderno-sidebar h2 {
    margin: 0 0 8px;
    color: white;
    font-size: 24px;
    font-weight: 800;
}

.cuaderno-sidebar p {
    margin: 0 0 34px;
    color: #94a3b8;
    font-size: 14px;
}

.cuaderno-nav {
    display: grid;
    gap: 12px;
}

.cuaderno-nav-item {
    display: block;
    padding: 14px 15px;
    border-radius: 13px;
    background: transparent;
    color: #e5e7eb;
    text-decoration: none !important;
    font-weight: 600;
}

.cuaderno-nav-item.active,
.cuaderno-nav-item:hover {
    background: #1d2538;
    color: white;
}


.cuaderno-nav-user,
.cuaderno-nav-user:hover,
.cuaderno-nav-user:focus,
.cuaderno-nav-user:active {
    cursor: default;
    background: transparent !important;
    color: #e5e7eb !important;
    text-align: center;
    font-weight: 800;
    pointer-events: none;
}

.cuaderno-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    border-radius: 999px;
    background: #070b1a;
    color: white !important;
    text-align: center;
    text-decoration: none !important;
    font-weight: 800;
    white-space: nowrap;
}

.cuaderno-logout:hover {
    color: white !important;
    background: #111827;
}

.cuaderno-main {
    padding: 42px;
    min-width: 0;
}

.cuaderno-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
}

.cuaderno-topbar-left {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
    flex: 1 1 auto;
}

.cuaderno-topbar-left > div {
    min-width: 0;
}

.cuaderno-eyebrow {
    margin: 0 0 6px;
    color: #2563eb;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.cuaderno-topbar h1 {
    margin: 0 0 8px;
    color: #071022;
    font-size: 34px;
    line-height: 1.1;
    font-weight: 800;
}

.cuaderno-topbar p {
    margin: 0;
    color: #64748b;
    font-size: 16px;
    line-height: 1.5;
}


.cuaderno-current-section-title h1 {
    margin: 0;
    color: #071022;
    font-size: 34px;
    line-height: 1.1;
    font-weight: 800;
}

.cuaderno-topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    align-self: flex-start;
    gap: 10px;
}

.cuaderno-role-pill {
    padding: 9px 14px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-weight: 800;
    white-space: nowrap;
}

.cuaderno-user-card,
.cuaderno-content-card {
    background: white;
    border: 1px solid #dce4f0;
    border-radius: 22px;
    padding: 24px;
    margin-bottom: 24px;
}

.cuaderno-user-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr 1fr;
    gap: 16px;
}

.cuaderno-user-grid div {
    padding: 16px;
    border-radius: 16px;
    background: #f8fafc;
    min-width: 0;
}

.cuaderno-user-grid span {
    display: block;
    margin-bottom: 6px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.cuaderno-user-grid strong {
    display: block;
    color: #071022;
    font-size: 15px;
    overflow-wrap: anywhere;
}

.cuaderno-summary-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
    width: 100%;
    align-items: stretch;
}

.cuaderno-summary-card {
    display: block !important;
    width: 100%;
    min-width: 0;
    background: white;
    border: 1px solid #dce4f0;
    border-radius: 22px;
    padding: 24px;
    min-height: 160px;
    text-decoration: none !important;
    color: #071022 !important;
    box-shadow: 0 14px 40px rgba(21, 35, 70, 0.06);
    overflow: hidden;
}

.cuaderno-summary-card:hover {
    color: #071022 !important;
    transform: translateY(-1px);
    transition: 0.15s ease;
}

.cuaderno-summary-card span {
    display: block !important;
    font-size: 30px;
    margin-bottom: 12px;
    line-height: 1;
}

.cuaderno-summary-card strong {
    display: block !important;
    margin-bottom: 8px;
    font-size: 20px;
    color: #071022 !important;
}

.cuaderno-summary-card p {
    margin: 0;
    color: #64748b !important;
    line-height: 1.5;
}

.cuaderno-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.cuaderno-section-header h2 {
    margin: 0;
    color: #071022;
    font-size: 24px;
    font-weight: 800;
}

.cuaderno-section-header p {
    margin: 6px 0 0;
    color: #64748b;
}

.cuaderno-alert-error,
.cuaderno-alert-success,
.cuaderno-alert-warning {
    padding: 16px 18px;
    border-radius: 16px;
    font-weight: 800;
    margin-bottom: 22px;
}

.cuaderno-alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.cuaderno-alert-success {
    background: #dcfce7;
    color: #166534;
}

.cuaderno-alert-warning {
    background: #fff7ed;
    color: #9a3412;
}

.cuaderno-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
    row-gap: 20px;
    margin-top: 18px;
}

.cuaderno-field {
    min-width: 0;
}

.cuaderno-field label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: 14px;
    font-weight: 800;
}

.cuaderno-field input,
.cuaderno-field select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid #cfd8e6;
    border-radius: 12px;
    background: #f8fafc;
    color: #071022;
    font: inherit;
}

.cuaderno-bulk-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding: 16px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
}

.cuaderno-bulk-actions strong {
    margin-right: 6px;
}

.cuaderno-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.cuaderno-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.cuaderno-table th,
.cuaderno-table td {
    padding: 15px 16px;
    border-bottom: 1px solid #edf2f7;
    text-align: left;
    vertical-align: middle;
}

.cuaderno-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cuaderno-table tr:last-child td {
    border-bottom: 0;
}

.cuaderno-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
    cursor: pointer;
}

.cuaderno-table select {
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #cfd8e6;
    border-radius: 10px;
    background: #f8fafc;
    font-weight: 700;
}

.cuaderno-row-note {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.cuaderno-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.cuaderno-badge-admin,
.cuaderno-badge-suspendido {
    background: #fee2e2;
    color: #991b1b;
}

.cuaderno-badge-profesor,
.cuaderno-badge-activo {
    background: #dcfce7;
    color: #166534;
}

.cuaderno-badge-secretario {
    background: #dbeafe;
    color: #1e40af;
}

.cuaderno-badge-secondary {
    background: #f1f5f9;
    color: #475569;
}

.cuaderno-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.cuaderno-action-form {
    margin: 0;
}

.cuaderno-button {
    border: 0;
    border-radius: 10px;
    padding: 10px 12px;
    font-weight: 800;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    text-decoration: none;
}

.cuaderno-button-primary {
    background: #2563eb;
    color: white;
}

.cuaderno-button-secondary {
    background: #eef2f7;
    color: #172033;
}

.cuaderno-button-success {
    background: #16a34a;
    color: white;
}

.cuaderno-button-danger {
    background: #dc2626;
    color: white;
}

.cuaderno-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.cuaderno-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(7, 11, 26, 0.62);
}

.cuaderno-modal-overlay.is-open {
    display: flex;
}

.cuaderno-modal-card {
    width: min(720px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: white;
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 24px 80px rgba(7, 11, 26, 0.32);
}

.cuaderno-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.cuaderno-modal-header h2 {
    margin: 0 0 8px;
    color: #071022;
    font-size: 26px;
    font-weight: 800;
}

.cuaderno-modal-header p {
    margin: 0;
    color: #64748b;
}

.cuaderno-modal-close {
    border: 0;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #eef2f7;
    color: #071022;
    font-size: 22px;
    font-weight: 800;
    cursor: pointer;
}

.cuaderno-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

.cuaderno-login-card {
    max-width: 520px;
    margin: 70px auto;
    padding: 32px;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    background: white;
    font-family: Inter, system-ui, sans-serif;
    box-shadow: 0 18px 50px rgba(21, 35, 70, 0.10);
}

.cuaderno-login-card h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

.cuaderno-login-card p {
    margin: 0 0 22px;
    color: #64748b;
}

.cuaderno-login-card a {
    display: inline-block;
    padding: 13px 18px;
    border-radius: 12px;
    background: #2563eb;
    color: white;
    text-decoration: none;
    font-weight: 800;
}

.cuaderno-login-card a:hover {
    color: white;
    background: #1d4ed8;
}

@media (max-width: 1000px) {
    .cuaderno-app-shell {
        width: min(100%, calc(100vw - 24px));
        grid-template-columns: 1fr;
        margin: 12px auto 24px;
    }

    .cuaderno-sidebar {
        min-height: auto;
    }

    .cuaderno-main {
        padding: 26px 18px;
    }

    .cuaderno-topbar {
        flex-direction: column;
    }

    .cuaderno-topbar-actions {
        align-self: flex-end;
    }

    .cuaderno-user-grid,
    .cuaderno-form-grid {
        grid-template-columns: 1fr;
    }

    .cuaderno-summary-grid {
        grid-template-columns: 1fr;
    }

    .cuaderno-section-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =========================
   CLASES REALES
   ========================= */

.cuaderno-class-form .cuaderno-alert-warning {
    margin-top: 22px;
}

.cuaderno-class-students {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.cuaderno-student-group {
    padding: 18px;
    border: 1px solid #edf2f7;
    border-radius: 18px;
    background: #f8fafc;
}

.cuaderno-student-group h3 {
    margin: 0 0 14px;
    color: #071022;
    font-size: 18px;
    font-weight: 800;
}

.cuaderno-student-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.cuaderno-student-item {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid #e7ecf5;
    border-radius: 13px;
    background: white;
    cursor: pointer;
}

.cuaderno-student-item:hover {
    border-color: #bfdbfe;
    background: #f8fbff;
}

.cuaderno-student-item input {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
}

.cuaderno-student-item span {
    color: #344054;
    font-weight: 700;
}

@media (max-width: 800px) {
    .cuaderno-student-list {
        grid-template-columns: 1fr;
    }
}

/* =========================
   CLASES: ACCIONES Y EDICIÓN
   ========================= */

.cuaderno-student-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 20px 0 0;
    padding: 14px 16px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
}

.cuaderno-student-tools span {
    color: #64748b;
    font-weight: 800;
}

.cuaderno-table .cuaderno-actions {
    min-width: 260px;
}

.cuaderno-table .cuaderno-actions .cuaderno-button {
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 800px) {
    .cuaderno-student-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .cuaderno-student-tools .cuaderno-button {
        width: 100%;
    }
}

/* =========================
   AJUSTE GENERAL: APP MÁS ANCHA
   ========================= */

.cuaderno-app-shell {
    width: calc(100vw - 20px);
    max-width: none;
    min-height: calc(100vh - 20px);
    margin: 10px auto;
    grid-template-columns: 300px minmax(0, 1fr);
}

.cuaderno-main {
    padding: 25px 15px;
}

.cuaderno-content-card {
    width: 100%;
}

.cuaderno-table-wrapper::-webkit-scrollbar {
    height: 10px;
}

.cuaderno-table-wrapper::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 999px;
}

.cuaderno-table-wrapper::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 999px;
}

.cuaderno-content-card .cuaderno-table {
    table-layout: auto;
}

.cuaderno-content-card .cuaderno-table td {
    line-height: 1.45;
}

.cuaderno-actions .cuaderno-button,
.cuaderno-actions .cuaderno-action-form {
    flex-shrink: 0;
}

.cuaderno-actions-right {
    margin-left: auto;
    justify-content: flex-end;
}

@media (min-width: 1500px) {
    .cuaderno-app-shell {
        width: calc(100vw - 20px);
        grid-template-columns: 320px minmax(0, 1fr);
    }

    .cuaderno-main {
        padding: 48px 64px;
    }

    .cuaderno-table {
        font-size: 16px;
    }
}

/* =========================
   NOTAS: TABLA MÁS COMPACTA
   ========================= */

.cuaderno-notes-table {
    table-layout: fixed;
    width: 100%;
}

.cuaderno-notes-table th,
.cuaderno-notes-table td {
    padding: 13px 12px;
    vertical-align: middle;
}

.cuaderno-notes-table th:first-child,
.cuaderno-notes-table td:first-child {
    width: auto;
    min-width: 260px;
    text-align: left;
}

.cuaderno-notes-table th:nth-child(2),
.cuaderno-notes-table td:nth-child(2) {
    width: 110px;
    min-width: 110px;
    text-align: center;
}

.cuaderno-notes-table th:nth-child(n+3),
.cuaderno-notes-table td:nth-child(n+3) {
    width: 72px;
    min-width: 72px;
    max-width: 72px;
    text-align: center;
}

.cuaderno-notes-table .cuaderno-badge {
    min-width: 38px;
    min-height: 38px;
    padding: 6px 10px;
}

.cuaderno-notes-table .cuaderno-row-note {
    margin-top: 6px;
}

.cuaderno-grade-select {
    width: 62px;
    min-width: 62px;
    min-height: 40px;
    padding: 7px 8px;
    text-align: center;
    border: 1px solid #cfd8e6;
    border-radius: 10px;
    background: #f8fafc;
    color: #071022;
    font-weight: 800;
}

@media (max-width: 1000px) {
    .cuaderno-app-shell {
        width: min(100%, calc(100vw - 16px));
        grid-template-columns: 1fr;
        margin: 8px auto 18px;
    }

    .cuaderno-main {
        padding: 26px 18px;
    }

    .cuaderno-notes-table {
        min-width: 760px;
    }
}

/* =========================
   NOTAS: TABLAS MÁS COMPATIBLES
   Sin selectores modernos complejos, para evitar avisos del editor de Hostinger.
   Mantiene "Criterio A/B/C/D" y compacta las columnas de notas.
   ========================= */

.cuaderno-notes-table {
    table-layout: fixed;
}

.cuaderno-notes-table th,
.cuaderno-notes-table td {
    padding: 13px 12px;
}

.cuaderno-notes-table th:first-child,
.cuaderno-notes-table td:first-child {
    width: 42%;
    min-width: 260px;
    text-align: left;
}

.cuaderno-notes-table th:nth-child(2),
.cuaderno-notes-table td:nth-child(2) {
    width: 110px;
    min-width: 110px;
    text-align: center;
}

.cuaderno-notes-table th:nth-child(n+3),
.cuaderno-notes-table td:nth-child(n+3) {
    width: 115px;
    min-width: 115px;
    max-width: 115px;
    text-align: center;
}

.cuaderno-notes-table th:nth-child(n+3) {
    line-height: 1.25;
    white-space: normal;
}

.cuaderno-notes-table .cuaderno-grade-select {
    width: 82px;
    min-width: 82px;
    max-width: 82px;
    margin: 0 auto;
    display: inline-block;
}

@media (max-width: 1000px) {
    .cuaderno-notes-table {
        min-width: 860px;
    }
}

/* Filtros: versión organizada en columnas */
.cuaderno-filter-panel,
.cuaderno-notes-filter-panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 18px;
    align-items: end;
    margin-top: 24px;
    padding: 20px;
    border: 1px solid #edf2f7;
    border-radius: 20px;
    background: #f8fafc;
}

.cuaderno-filter-field {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.cuaderno-filter-field label {
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cuaderno-filter-field select {
    width: 100%;
    min-height: 46px;
    padding: 9px 38px 9px 14px;
    border: 1px solid #cfd8e6;
    border-radius: 12px;
    background-color: #ffffff;
    color: #071022;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.cuaderno-filter-field select:focus {
    outline: 2px solid rgba(37, 99, 235, 0.18);
    border-color: #2563eb;
}

@media (max-width: 1100px) {
    .cuaderno-filter-panel,
    .cuaderno-notes-filter-panel {
        grid-template-columns: repeat(2, minmax(170px, 1fr));
    }
}

@media (max-width: 700px) {
    .cuaderno-filter-panel,
    .cuaderno-notes-filter-panel {
        grid-template-columns: 1fr;
    }
}

/* Boletines imprimibles */
.cuaderno-print-filters {
    align-items: end;
}

.cuaderno-filter-field-wide select {
    min-width: 280px;
}

.cuaderno-filter-actions {
    display: flex;
    align-items: end;
}

.cuaderno-report-actions {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 18px;
}

.cuaderno-report-card {
    background: #ffffff;
    border: 1px solid #dbe5f1;
    border-radius: 22px;
    padding: 34px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.cuaderno-report-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    padding-bottom: 22px;
    border-bottom: 3px solid #f59e0b;
    margin-bottom: 24px;
}

.cuaderno-report-header h2 {
    margin: 0 0 8px;
    font-size: clamp(28px, 3vw, 42px);
}

.cuaderno-report-header p {
    margin: 0;
    color: #64748b;
    font-weight: 700;
}

.cuaderno-report-meta {
    display: grid;
    gap: 6px;
    text-align: right;
    padding: 14px 18px;
    border-radius: 16px;
    background: #fff7ed;
    color: #9a3412;
    min-width: 160px;
}

.cuaderno-report-meta strong {
    font-size: 18px;
}

.cuaderno-report-meta span {
    font-weight: 800;
}

.cuaderno-report-table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 14px;
    font-size: 15px;
}

.cuaderno-report-table th {
    background: #f97316;
    color: #ffffff;
    padding: 13px 12px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 12px;
}

.cuaderno-report-table th:first-child,
.cuaderno-report-table td:first-child {
    text-align: left;
}

.cuaderno-report-table td {
    border: 1px solid #fed7aa;
    padding: 13px 12px;
    text-align: center;
    vertical-align: middle;
}

.cuaderno-report-table tbody tr:nth-child(even) {
    background: #fff7ed;
}

.cuaderno-report-table td:first-child span {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.cuaderno-report-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 22px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

@media print {
    body {
        background: #ffffff !important;
    }

    #wpadminbar,
    .cuaderno-sidebar,
    .cuaderno-topbar,
    .no-print,
    .cuaderno-content-card.no-print {
        display: none !important;
    }

    .cuaderno-app-shell {
        width: 100% !important;
        min-height: auto !important;
        margin: 0 !important;
        display: block !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        background: #ffffff !important;
    }

    .cuaderno-main {
        padding: 0 !important;
        margin: 0 !important;
        background: #ffffff !important;
    }

    .cuaderno-report-card {
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
        page-break-inside: avoid;
    }

    .cuaderno-report-table th {
        background: #f97316 !important;
        color: #ffffff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .cuaderno-report-table tbody tr:nth-child(even) {
        background: #fff7ed !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Boletines por grupo */
.cuaderno-reports-stack {
    display: grid;
    gap: 28px;
}

.cuaderno-report-actions {
    align-items: center;
    gap: 16px;
}

.cuaderno-report-actions > div {
    margin-right: auto;
    color: #334155;
    font-weight: 800;
}

@media print {
    .cuaderno-reports-stack {
        display: block !important;
        gap: 0 !important;
    }

    .cuaderno-report-card {
        page-break-after: always;
        break-after: page;
        margin: 0 !important;
        min-height: auto !important;
    }

    .cuaderno-report-card:last-child {
        page-break-after: auto;
        break-after: auto;
    }
}


/* Modo Ver como profesor */
.cuaderno-view-as-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    margin: 0 0 24px;
    border: 1px solid #fde68a;
    border-radius: 20px;
    background: #fffbeb;
    color: #78350f;
}

.cuaderno-view-as-banner h2 {
    margin: 0 0 6px;
    font-size: 24px;
}

.cuaderno-view-as-banner p {
    margin: 0;
    color: #92400e;
}

.cuaderno-view-as-card {
    margin-top: 24px;
}

.cuaderno-view-as-form {
    align-items: end;
}

.cuaderno-filter-actions {
    display: flex;
    align-items: end;
    min-height: 72px;
}

@media (max-width: 900px) {
    .cuaderno-view-as-banner {
        display: grid;
    }

    .cuaderno-filter-actions {
        min-height: 0;
    }
}
/* Campos de fecha en Auditoría */
.cuaderno-filter-panel .cuaderno-date-input {
    width: 100%;
    min-width: 180px;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid #cfd8e6;
    border-radius: 12px;
    background-color: #ffffff;
    color: #071022;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: none;
}

.cuaderno-filter-panel .cuaderno-date-input:focus {
    outline: 2px solid rgba(37, 99, 235, 0.18);
    border-color: #2563eb;
}

.cuaderno-filter-panel .cuaderno-date-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.75;
}

.cuaderno-filter-actions {
    display: flex;
    align-items: end;
}

.cuaderno-filter-actions .cuaderno-button {
    min-height: 46px;
}

/* Impresión limpia de boletines sin alterar el diseño */
@media print {
    #wpadminbar,
    .cuaderno-sidebar,
    .cuaderno-topbar,
    .cuaderno-role-pill,
    .cuaderno-view-as-card,
    .cuaderno-summary-grid,
    .cuaderno-user-card,
    .cuaderno-filter-panel,
    .cuaderno-report-actions,
    .cuaderno-button,
    .cuaderno-alert-success,
    .cuaderno-alert-warning,
    .cuaderno-alert-error {
        display: none !important;
    }

    html,
    body {
        background: #ffffff !important;
    }

    .cuaderno-app-shell {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    .cuaderno-main {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
    }

    .cuaderno-content-card {
        display: none !important;
    }

    .cuaderno-report-card {
        display: block !important;
        margin: 0 auto !important;
        page-break-after: always;
        break-after: page;
    }

    .cuaderno-report-card:last-child {
        page-break-after: auto;
        break-after: auto;
    }
}

/* Separación superior controlada cuando la app está dentro de WordPress */
body.logged-in .cuaderno-app-shell {
    margin-top: 0 !important;
}

body.logged-in .cuaderno-main {
    padding-top: 32px !important;
}

body.logged-in .cuaderno-sidebar {
    margin-top: 0 !important;
}


/* Solo cambio de tipografía en títulos de la app */
.cuaderno-app-shell h1,
.cuaderno-app-shell h2,
.cuaderno-app-shell h3,
.cuaderno-login-shell h1,
.cuaderno-login-shell h2,
.cuaderno-login-shell h3,
.cuaderno-login-panel h1,
.cuaderno-login-panel h2,
.cuaderno-login-panel h3,
.cuaderno-login-card h1,
.cuaderno-login-card h2,
.cuaderno-login-card h3,
.cuaderno-report-card h1,
.cuaderno-report-card h2,
.cuaderno-report-card h3 {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

/* Layout fluido general: evita saltos bruscos entre tamaños */
body.cuaderno-page-active .cuaderno-app-shell {
    width: 100vw !important;
    min-height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    grid-template-columns: clamp(250px, 18vw, 320px) minmax(0, 1fr) !important;
}
body.cuaderno-page-active .cuaderno-sidebar {
    padding: clamp(22px, 2vw, 34px) clamp(14px, 1.5vw, 24px) !important;
}

body.cuaderno-page-active .cuaderno-main {
    padding: clamp(18px, 1.8vw, 42px) clamp(10px, 1.5vw, 56px) !important;
}

body.cuaderno-page-active.logged-in .cuaderno-main {
    padding-top: clamp(18px, 1.8vw, 42px) !important;
}

body.cuaderno-page-active .cuaderno-topbar {
    margin-bottom: clamp(16px, 1.6vw, 30px) !important;
}

body.cuaderno-page-active .cuaderno-content-card,
body.cuaderno-page-active .cuaderno-user-card {
    padding: clamp(16px, 1.6vw, 24px) !important;
    border-radius: clamp(18px, 1.4vw, 22px) !important;
    margin-bottom: clamp(16px, 1.5vw, 24px) !important;
}

body.cuaderno-page-active .cuaderno-topbar h1 {
    font-size: clamp(30px, 2.4vw, 34px) !important;
}

body.cuaderno-page-active .cuaderno-section-header h2 {
    font-size: clamp(22px, 1.8vw, 24px) !important;
}


/* Quitar padding/margen del contenedor WordPress en la página del Cuaderno */
body.cuaderno-page-active .entry-content,
body.cuaderno-page-active .wp-block-post-content,
body.cuaderno-page-active .has-global-padding,
body.cuaderno-page-active .is-layout-constrained,
body.cuaderno-page-active main,
body.cuaderno-page-active .wp-site-blocks {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    width: 100% !important;
}

body.cuaderno-page-active .entry-content > *,
body.cuaderno-page-active .wp-block-post-content > *,
body.cuaderno-page-active .is-layout-constrained > *,
body.cuaderno-page-active .has-global-padding > * {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: none !important;
}

/* Evitar scroll horizontal global de la página del Cuaderno */
html,
body {
    overflow-x: hidden !important;
}

body.cuaderno-page-active {
    overflow-x: hidden !important;
}

body.cuaderno-page-active .wp-site-blocks,
body.cuaderno-page-active main,
body.cuaderno-page-active .entry-content,
body.cuaderno-page-active .wp-block-post-content,
body.cuaderno-page-active .has-global-padding,
body.cuaderno-page-active .is-layout-constrained {
    overflow-x: hidden !important;
}


body.cuaderno-page-active .cuaderno-app-shell {
    width: 100vw !important;
    min-height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    grid-template-columns: clamp(250px, 18vw, 320px) minmax(0, 1fr) !important;
}





body.cuaderno-page-active .cuaderno-main {
    min-width: 0 !important;
    overflow-x: hidden !important;
}

body.cuaderno-page-active .cuaderno-table-wrapper {
    overflow-x: auto !important;
}



/* Botón para ocultar/mostrar el menú lateral */
.cuaderno-sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: #070b1a;
    color: #ffffff;
    text-align: center;
    text-decoration: none !important;
    font: inherit;
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.cuaderno-sidebar-toggle:hover,
.cuaderno-sidebar-toggle:focus {
    background: #111827;
    color: #ffffff;
}

.cuaderno-app-shell.cuaderno-sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr) !important;
}

.cuaderno-app-shell.cuaderno-sidebar-collapsed .cuaderno-sidebar {
    display: none !important;
}

.cuaderno-app-shell.cuaderno-sidebar-collapsed .cuaderno-main {
    grid-column: 1 / -1 !important;
}

body.cuaderno-page-active .cuaderno-app-shell.cuaderno-sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr) !important;
}

body.cuaderno-page-active .cuaderno-app-shell.cuaderno-sidebar-collapsed .cuaderno-main {
    grid-column: 1 / -1 !important;
}

@media (max-width: 700px) {
    .cuaderno-topbar-actions {
        flex-wrap: wrap;
    }

    .cuaderno-topbar-left {
        width: 100%;
    }
}



.cuaderno-form-field-full {
    grid-column: 1 / -1;
}

.cuaderno-form-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.cuaderno-report-observation-card {
    border-color: #d7e5f5;
}

.cuaderno-report-observation-form {
    margin-top: 10px;
}

.cuaderno-report-observation-target {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 0;
    padding: 8px 12px;
    border-radius: 999px;
    background: #eef6ff;
    color: #1f4e79 !important;
    font-size: 13px;
    font-weight: 800;
}

.cuaderno-report-observation-field label {
    display: block;
    margin-bottom: 10px;
    color: #334155;
    font-size: 14px;
    font-weight: 800;
}

.cuaderno-report-observation-textarea {
    width: 100%;
    min-height: 170px;
    padding: 16px 18px;
    border: 1px solid #cfd8e6;
    border-radius: 16px;
    background: #f8fbff;
    color: #071022;
    font: inherit;
    line-height: 1.6;
    resize: vertical;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.cuaderno-report-observation-textarea::placeholder {
    color: #94a3b8;
}

.cuaderno-report-observation-textarea:focus {
    outline: none;
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.cuaderno-report-observation-help {
    margin: 10px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.cuaderno-report-observation-actions {
    margin-top: 2px;
}

@media (max-width: 782px) {
    .cuaderno-report-observation-target {
        display: inline-flex;
        width: 100%;
        border-radius: 14px;
        white-space: normal;
        line-height: 1.4;
    }

    .cuaderno-form-actions {
        justify-content: stretch;
    }

    .cuaderno-form-actions .cuaderno-button {
        width: 100%;
        text-align: center;
    }
}
