.site-header,
.main-navigation,
.custom-menu-bar,
.navbar,
.navbar-default,
.navbar-static-top,
.navbar-collapse,
.navbar-header,
.elementor-location-header,
.elementor-location-footer,
.site-footer,
.contenedor-footer,
body > header,
body > footer,
body > .site-header,
body > .main-navigation,
body > .custom-menu-bar,
body > .navbar,
body > .elementor-location-header,
body > .elementor-location-footer,
body > .site-footer,
body > .menu-header,
header,
footer {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
}

body {
    background: #f4f6f8 !important;
}

.cest-panel-body {
    margin: 0 !important;
    min-height: 100vh;
    background: #f4f6f8 !important;
}

.student-panel {
    width: min(1180px, calc(100% - 32px));
    min-height: 420px;
    margin: 32px auto 64px;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.student-panel__nav {
    background: #4b0f6b;
    padding: 22px 18px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.student-panel__nav-title {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: rgba(255,255,255,.74);
}

.student-panel__link {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 9px 10px;
    border-radius: 6px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    line-height: 1.25;
}

.student-panel__link:hover,
.student-panel__link:focus {
    color: #ffffff;
    text-decoration: none;
    background: rgba(255,255,255,.13);
}

.student-panel__link.is-active {
    background: #ffffff;
    color: #4b0f6b;
}

.student-panel__content {
    padding: 30px;
    min-width: 0;
}

.student-panel__eyebrow {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #64748b;
}

.student-panel__title {
    margin: 0;
    color: #4b0f6b;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 800;
    line-height: 1.1;
}

.student-panel__intro {
    margin: 10px 0 0;
    max-width: 680px;
    color: #475569;
    font-size: 15px;
}

.student-panel__section {
    margin-top: 30px;
}

.student-panel__section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #7c3aed;
}

.student-panel__section-title {
    margin: 0;
    color: #4b0f6b;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
}

.student-panel__empty,
.student-panel__notice {
    margin-top: 18px;
    padding: 18px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
}

.student-panel__toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.student-panel input,
.student-panel select,
.student-panel textarea {
    max-width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
}

.student-panel .button,
.student-panel button,
.student-panel input[type="submit"] {
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid #4b0f6b;
    border-radius: 6px;
    background: #4b0f6b;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.student-panel .button-primary {
    background: #4b0f6b;
    border-color: #4b0f6b;
    color: #ffffff;
}

.student-panel .notice {
    margin: 14px 0;
    padding: 12px 14px;
    border-left: 4px solid #4b0f6b;
    background: #f8fafc;
}

.student-panel .cest-panel {
    margin-top: 18px;
    padding: 0;
    border: 0;
    background: transparent;
}

.student-panel .cest-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.student-panel .cest-panel__header h2 {
    margin: 0 0 6px;
    color: #17212b;
    font-size: 20px;
    font-weight: 800;
}

.student-panel .cest-panel__muted {
    margin: 0;
    color: #64748b;
}

.student-panel .cest-form {
    margin-top: 16px;
}

.student-panel .cest-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.student-panel .cest-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.student-panel .cest-field label {
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.student-panel .cest-field input,
.student-panel .cest-field select,
.student-panel .cest-field textarea {
    width: 100%;
}

.student-panel .cest-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.student-panel .cest-button {
    min-height: 42px;
    padding: 9px 16px;
    border: 1px solid #4b0f6b;
    border-radius: 6px;
    background: #4b0f6b;
    color: #ffffff;
    font-weight: 800;
}

.student-panel .cest-alert {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
}

.student-panel .cest-alert--success {
    border-color: #86efac;
    background: #f0fdf4;
    color: #166534;
}

.student-panel .cest-alert--error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.student-panel__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.student-panel__stat {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
}

.student-panel__stat strong {
    display: block;
    margin-top: 4px;
    color: #4b0f6b;
    font-size: 24px;
}

.student-panel__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.student-panel__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid #4b0f6b;
    background: #4b0f6b;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
}

.student-panel__button:hover {
    color: #ffffff;
    text-decoration: none;
    background: #3b0b55;
}

.student-panel__button.secondary {
    background: #ffffff;
    color: #4b0f6b;
}

.student-panel__table-wrap {
    margin-top: 18px;
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.student-panel table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    margin: 0;
    background: #ffffff;
}

.student-panel th,
.student-panel td {
    padding: 12px 14px;
    border-bottom: 1px solid #eef2f7;
    text-align: left;
    vertical-align: middle;
}

.student-panel th {
    background: #f8fafc;
    color: #334155;
    font-weight: 800;
}

.student-panel tr:last-child td {
    border-bottom: 0;
}

.student-panel__cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.student-panel__card {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
}

.student-panel__card h3 {
    margin: 0 0 8px;
    color: #17212b;
    font-size: 18px;
}

.student-panel__logout {
    margin-left: auto;
}

.cest-preview-bar {
    grid-column: 1 / -1;
    padding: 12px 16px;
    background: #fff7ed;
    border-bottom: 1px solid #fed7aa;
    color: #7c2d12;
    font-weight: 600;
}

.cest-preview-bar a {
    color: #4b0f6b;
    font-weight: 800;
}

.student-panel__content--wide {
    overflow: hidden;
    padding: 30px;
    background: #ffffff;
}

.official-kardex {
    position: relative;
    min-height: 560px;
    padding: 0;
    overflow: hidden;
    background: #ffffff;
    color: #4b0f6b;
    font-family: Arial, Helvetica, sans-serif;
}

.official-kardex__header {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, .55fr);
    gap: 24px;
    max-width: 760px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid #111827;
    color: #17212b;
    font-size: 13px;
    font-weight: 700;
}

.official-kardex__header p {
    margin: 0 0 6px;
}

.official-kardex__title {
    position: relative;
    z-index: 2;
    margin: 0 0 18px;
    color: #4b0f6b;
    font-size: 14px;
    font-weight: 800;
}

.official-kardex__table-wrap {
    position: relative;
    z-index: 2;
    max-width: 100%;
    overflow-x: auto;
}

.student-panel .official-kardex__table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    background: transparent;
    color: #3b0b55;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.15;
}

.student-panel .official-kardex__table th,
.student-panel .official-kardex__table td {
    padding: 3px 5px;
    border: 0;
    text-align: center;
    vertical-align: middle;
}

.student-panel .official-kardex__table th {
    background: #f2c72f;
    color: #26102f;
    font-size: 10px;
    font-weight: 800;
}

.student-panel .official-kardex__table th:nth-child(4),
.student-panel .official-kardex__table td:nth-child(4) {
    text-align: left;
}

.student-panel .official-kardex__table tbody tr:nth-child(odd) {
    background: #f7f2fb;
}

.student-panel .official-kardex__table tbody tr:nth-child(even) {
    background: #ffffff;
}

.official-kardex__watermark {
    position: absolute;
    right: 115px;
    z-index: 1;
    color: transparent;
    -webkit-text-stroke: 1px rgba(75, 15, 107, .34);
    text-stroke: 1px rgba(75, 15, 107, .34);
    font-size: 38px;
    font-weight: 800;
    line-height: 1;
    transform: rotate(-45deg);
    pointer-events: none;
    white-space: nowrap;
    opacity: .55;
}

.official-kardex__watermark--top {
    top: 150px;
}

.official-kardex__watermark--bottom {
    top: 430px;
}

.official-kardex__actions {
    position: relative;
    z-index: 6;
    max-width: 100%;
    margin-top: 18px;
    text-align: center;
}

.official-kardex__actions button {
    min-height: 24px;
    padding: 2px 10px;
    border: 1px solid #777;
    border-radius: 2px;
    background: #4b0f6b;
    color: #ffffff;
    font-size: 13px;
    cursor: pointer;
}

.cest-message-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    align-items: start;
    margin-top: 18px;
}

.cest-message-card {
    margin-bottom: 12px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
}

.cest-message-card__meta {
    margin-bottom: 6px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.cest-message-card h3 {
    margin: 0 0 8px;
    color: #17212b;
    font-size: 17px;
}

.cest-message-card p {
    margin: 0;
    color: #334155;
    line-height: 1.5;
}

.cest-message-compose {
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
}

.cest-message-compose h3 {
    margin: 0 0 14px;
    color: #17212b;
    font-size: 18px;
}

.cest-message-compose label {
    display: block;
    margin: 12px 0 6px;
    font-weight: 800;
    color: #334155;
}

.cest-message-compose input,
.cest-message-compose select,
.cest-message-compose textarea {
    width: 100%;
    max-width: 100%;
    min-height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
}

.cest-message-compose textarea {
    min-height: 120px;
}

@media (max-width: 820px) {
    .student-panel {
        width: min(100% - 20px, 680px);
        grid-template-columns: 1fr;
        margin-top: 18px;
    }

    .student-panel__nav {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 14px;
    }

    .student-panel__nav-title {
        width: 100%;
        margin-bottom: 4px;
    }

    .student-panel__link {
        flex: 1 1 190px;
    }

    .student-panel__content {
        padding: 22px 18px;
    }

    .student-panel__content--wide {
        padding: 18px;
    }

    .official-kardex {
        padding: 0;
    }

    .official-kardex__header {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .official-kardex__watermark {
        right: -28px;
        font-size: 38px;
    }

    .cest-message-layout {
        grid-template-columns: 1fr;
    }

    .student-panel__stats,
    .student-panel__cards,
    .student-panel .cest-form__grid {
        grid-template-columns: 1fr;
    }
}

@media print {
    @page {
        size: letter portrait;
        margin: 10mm;
    }

    body {
        background: #ffffff !important;
    }

    html,
    body {
        width: 100% !important;
        min-width: 0 !important;
        overflow: visible !important;
    }

    .student-panel {
        display: block;
        width: 100%;
        margin: 0;
        border: 0;
        box-shadow: none;
        overflow: visible;
    }

    .student-panel__nav,
    .cest-preview-bar,
    .official-kardex__actions {
        display: none !important;
    }

    .student-panel__content--wide {
        padding: 0 !important;
        border: 0;
        box-shadow: none;
        overflow: visible;
    }

    .official-kardex {
        min-height: auto;
        padding: 0;
        overflow: visible;
    }

    .official-kardex__header,
    .official-kardex__title,
    .official-kardex__table-wrap,
    .official-kardex__actions {
        max-width: 100%;
    }

    .official-kardex__table-wrap {
        overflow: visible !important;
    }

    .student-panel .official-kardex__table {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
        font-size: 8.5px;
    }

    .student-panel .official-kardex__table th,
    .student-panel .official-kardex__table td {
        padding: 2px 3px;
        overflow-wrap: anywhere;
    }

    .student-panel .official-kardex__table th:nth-child(4),
    .student-panel .official-kardex__table td:nth-child(4) {
        width: 34%;
    }

    .official-kardex__watermark {
        left: 50%;
        right: auto;
        top: 50%;
        font-size: 26px;
        opacity: .16;
        -webkit-text-stroke: 1px rgba(75, 15, 107, .18);
        text-stroke: 1px rgba(75, 15, 107, .18);
        transform: translate(-50%, -50%) rotate(-35deg);
    }

    .official-kardex__watermark--bottom {
        display: none;
    }

    a[href]::after {
        content: "" !important;
    }
}
