:root {
    --politef-teal: #10a9a5;
    --politef-teal-dark: #087d7b;
    --politef-blue: #176fa5;
    --politef-blue-dark: #084d70;
    --politef-yellow: #ebc52d;
    --politef-ink: #17333d;
    --politef-muted: #61747c;
    --politef-surface: #ffffff;
    --politef-canvas: #f3f8f7;
    --politef-line: #dbe8e6;
    --politef-danger: #b83b4b;
    --politef-shadow-sm: 0 8px 24px rgba(16, 64, 73, 0.08);
    --politef-shadow-lg: 0 24px 64px rgba(8, 58, 70, 0.18);
    --politef-radius-sm: 12px;
    --politef-radius: 20px;
    --politef-radius-lg: 28px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    color: var(--politef-ink);
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

button,
input,
select,
textarea {
    font: inherit;
}

a,
button,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid rgba(235, 197, 45, 0.95) !important;
    outline-offset: 3px;
}

.portal-navbar {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(8, 77, 112, 0.1);
    box-shadow: 0 8px 24px rgba(10, 69, 84, 0.08);
    min-height: 72px;
    padding: 0.65rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.portal-navbar .container-fluid {
    gap: 0.75rem;
    margin: 0 auto;
    max-width: 1180px;
    padding-inline: clamp(1rem, 3vw, 2rem);
}

.portal-navbar .navbar-brand {
    align-items: center;
    display: inline-flex;
    gap: 0.75rem;
    margin: 0;
    min-width: 0;
    text-decoration: none;
}

.portal-navbar .navbar-brand img {
    height: 48px;
    object-fit: contain;
    width: 82px;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-copy strong {
    color: var(--politef-blue-dark);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-copy span {
    color: var(--politef-muted);
    font-size: 0.72rem;
    margin-top: 0.2rem;
}

.user-chip {
    align-items: center;
    background: #edf8f7;
    border: 1px solid #d3ebe8;
    border-radius: 999px;
    color: var(--politef-blue-dark) !important;
    display: inline-flex;
    font-size: 0.85rem;
    font-weight: 700;
    gap: 0.5rem;
    line-height: 1.2;
    max-width: min(42vw, 360px);
    padding: 0.55rem 0.8rem;
}

.user-chip i {
    color: var(--politef-teal-dark);
    flex: 0 0 auto;
    font-size: 1.15rem;
}

.user-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Acceso */
.login-page {
    background: var(--politef-blue-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
    overflow-x: hidden;
}

.login-page .bg-container {
    inset: 0;
    position: fixed;
    z-index: 0;
}

.login-page .bg-image {
    background-image: url("banner.jpg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    filter: none;
    height: 100%;
    transform: none;
    width: 100%;
}

.login-page .bg-container::before {
    background:
        linear-gradient(100deg, rgba(4, 61, 82, 0.97) 0%, rgba(4, 84, 96, 0.9) 45%, rgba(8, 86, 91, 0.55) 100%),
        linear-gradient(0deg, rgba(4, 54, 69, 0.22), rgba(4, 54, 69, 0.22));
    content: "";
    inset: 0;
    position: absolute;
    z-index: 1;
}

.login-page .login-container {
    align-items: center;
    display: grid;
    flex: 1 0 auto;
    gap: clamp(2rem, 7vw, 7rem);
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 440px);
    margin: 0 auto;
    max-width: 1180px;
    min-height: auto;
    padding: clamp(2rem, 5vw, 4.5rem) clamp(1rem, 4vw, 2.5rem);
    position: relative;
    width: 100%;
    z-index: 2;
}

.login-intro {
    color: #fff;
    max-width: 610px;
}

.login-brand {
    align-items: center;
    display: flex;
    gap: 1rem;
    margin-bottom: clamp(2rem, 6vh, 4.5rem);
}

.login-brand img {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 16px;
    box-shadow: var(--politef-shadow-sm);
    height: 74px;
    object-fit: contain;
    padding: 0.35rem 0.5rem;
    width: 126px;
}

.login-brand-copy strong,
.login-brand-copy span {
    display: block;
}

.login-brand-copy strong {
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 800;
    letter-spacing: 0.01em;
}

.login-brand-copy span {
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.login-eyebrow,
.section-eyebrow {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    margin: 0 0 0.8rem;
    text-transform: uppercase;
}

.login-eyebrow {
    color: var(--politef-yellow);
}

.section-eyebrow {
    color: var(--politef-teal-dark);
}

.login-intro h1 {
    color: #fff;
    font-size: clamp(2.35rem, 5vw, 4.25rem);
    font-weight: 750;
    letter-spacing: -0.045em;
    line-height: 1.02;
    margin: 0;
    max-width: 560px;
}

.login-lead {
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(1rem, 1.8vw, 1.12rem);
    line-height: 1.7;
    margin: 1.35rem 0 0;
    max-width: 530px;
}

.login-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
}

.login-benefits li {
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.85rem;
    font-weight: 650;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
}

.login-benefits i {
    color: var(--politef-yellow);
}

.login-panel {
    width: 100%;
}

.login-page .login-box {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--politef-radius-lg);
    box-shadow: var(--politef-shadow-lg);
    max-width: none;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    text-align: left;
    transition: none;
    width: 100%;
}

.login-page .login-box:hover {
    box-shadow: var(--politef-shadow-lg);
}

.login-mobile-logo {
    display: none;
}

.login-page .login-box h2 {
    color: var(--politef-ink);
    font-size: clamp(1.65rem, 4vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0;
}

.login-card-copy {
    color: var(--politef-muted);
    font-size: 0.94rem;
    line-height: 1.55;
    margin: 0.55rem 0 1.75rem;
}

.login-page .form-label {
    color: var(--politef-ink);
    display: block;
    font-size: 0.86rem;
    font-weight: 700;
    margin-bottom: 0.45rem;
}

.login-page .input-wrapper {
    margin-bottom: 1.15rem;
    position: relative;
}

.login-page .input-wrapper .form-icon {
    color: var(--politef-teal-dark);
    font-size: 1rem;
    left: 1rem;
    top: calc(50% + 0.8rem);
}

.login-page .form-control {
    background: #f8fbfb;
    border: 1px solid #cbdedb;
    border-radius: 14px;
    color: var(--politef-ink);
    font-size: 1rem;
    min-height: 52px;
    padding: 0.75rem 1rem 0.75rem 2.8rem;
}

.login-page .form-control::placeholder {
    color: #829399;
}

.login-page .form-control:focus {
    background: #fff;
    border-color: var(--politef-teal);
    box-shadow: 0 0 0 0.25rem rgba(16, 169, 165, 0.14);
}

.field-help {
    color: var(--politef-muted);
    font-size: 0.78rem;
    line-height: 1.45;
    margin: -0.45rem 0 1.2rem;
}

.login-page .btn-primary {
    align-items: center;
    background: linear-gradient(135deg, var(--politef-teal-dark), var(--politef-teal));
    border: 0;
    border-radius: 14px;
    box-shadow: 0 10px 22px rgba(8, 125, 123, 0.23);
    display: inline-flex;
    font-size: 0.95rem;
    font-weight: 800;
    justify-content: center;
    letter-spacing: 0.02em;
    min-height: 52px;
    padding: 0.8rem 1rem;
    text-transform: none;
    width: 100%;
}

.login-page .btn-primary:hover {
    background: linear-gradient(135deg, #066d6b, #0d9793);
    border: 0;
    box-shadow: 0 12px 24px rgba(8, 125, 123, 0.28);
    transform: translateY(-1px);
}

.login-page .error-message {
    align-items: flex-start;
    background: #fff1f2;
    border: 1px solid #f1c6cc;
    border-radius: 12px;
    color: #922b3a;
    display: flex;
    font-size: 0.86rem;
    font-weight: 650;
    gap: 0.6rem;
    line-height: 1.45;
    margin-top: 1rem;
    padding: 0.8rem 0.9rem;
}

.login-security {
    align-items: center;
    color: var(--politef-muted);
    display: flex;
    font-size: 0.76rem;
    gap: 0.45rem;
    justify-content: center;
    margin: 1.2rem 0 0;
}

.login-security i {
    color: var(--politef-teal-dark);
}

.login-page .footer {
    background: rgba(3, 47, 63, 0.72);
    bottom: auto;
    color: rgba(255, 255, 255, 0.72);
    flex: 0 0 auto;
    font-size: 0.78rem;
    left: auto;
    padding: 0.8rem 1rem;
    position: relative;
    text-align: center;
    width: 100%;
    z-index: 2;
}

/* Panel */
.dashboard-page {
    background: #eaf3f2;
    min-height: 100vh;
    min-height: 100svh;
}

.dashboard-page .bg-container {
    inset: 0;
    position: fixed;
    z-index: 0;
}

.dashboard-page .bg-image {
    background-attachment: scroll;
    background-image: url("Imagenes/dashboard.jpg");
    background-position: center;
    background-size: cover;
    height: 100%;
}

.dashboard-page .bg-container::before {
    background: linear-gradient(135deg, rgba(4, 68, 82, 0.84), rgba(7, 110, 105, 0.68));
    content: "";
    inset: 0;
    position: absolute;
}

.dashboard-page .main-content {
    padding: clamp(1.25rem, 4vw, 3rem) 0 clamp(2.5rem, 6vw, 5rem);
    position: relative;
    z-index: 1;
}

.dashboard-page .main-content > .container {
    max-width: 1140px;
    padding-inline: clamp(1rem, 3vw, 1.5rem);
}

.dashboard-page .row.g-4 {
    --bs-gutter-x: clamp(1rem, 3vw, 2rem);
    --bs-gutter-y: 1.5rem;
}

.dashboard-page .dashboard-card {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: var(--politef-radius-lg);
    box-shadow: var(--politef-shadow-lg);
    margin: 0;
    max-width: none;
    padding: clamp(1.25rem, 3vw, 2rem);
    position: sticky;
    text-align: left;
    top: 96px;
    width: 100%;
}

.dashboard-page .card-title-custom {
    color: var(--politef-blue-dark);
    font-size: clamp(1.65rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    margin: 0;
}

.dashboard-intro {
    color: var(--politef-muted);
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0.55rem 0 1.35rem;
}

.dashboard-action-list {
    display: grid;
    gap: 0.75rem;
}

.dashboard-page .dashboard-btn-link {
    --action-color: var(--politef-teal-dark);
    align-items: center;
    background: #f7fbfb;
    border: 1px solid var(--politef-line);
    border-radius: 16px;
    color: var(--politef-ink);
    display: grid;
    gap: 0.85rem;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    margin: 0;
    min-height: 72px;
    padding: 0.7rem 0.8rem;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.dashboard-page .dashboard-btn-link:hover {
    border-color: color-mix(in srgb, var(--action-color) 38%, white);
    box-shadow: 0 10px 20px rgba(13, 88, 93, 0.1);
    color: var(--politef-ink);
    transform: translateY(-2px);
}

.dashboard-page .dashboard-btn-link.btn-pagos {
    --action-color: var(--politef-blue);
}

.dashboard-page .dashboard-btn-link.btn-plataforma {
    --action-color: #438d57;
}

.action-icon {
    align-items: center;
    background: color-mix(in srgb, var(--action-color) 12%, white);
    border-radius: 14px;
    color: var(--action-color);
    display: flex;
    font-size: 1.25rem;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.action-icon svg {
    height: 23px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 23px;
}

.action-copy {
    min-width: 0;
}

.action-copy strong,
.action-copy small {
    display: block;
}

.action-copy strong {
    font-size: 0.95rem;
    font-weight: 750;
}

.action-copy small {
    color: var(--politef-muted);
    font-size: 0.76rem;
    line-height: 1.35;
    margin-top: 0.18rem;
}

.action-arrow {
    color: var(--action-color);
    height: 18px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 18px;
}

.dashboard-page .logout-form {
    border-top: 1px solid var(--politef-line);
    margin-top: 1.15rem;
    padding-top: 1.15rem;
}

.dashboard-page .logout-btn {
    align-items: center;
    background: #fff5f4;
    border: 1px solid #f0d7d3;
    border-radius: 14px;
    color: #9a453e;
    display: flex;
    font-size: 0.9rem;
    font-weight: 700;
    gap: 0.55rem;
    justify-content: center;
    margin: 0;
    min-height: 48px;
    padding: 0.7rem 1rem;
    width: 100%;
}

.dashboard-page .logout-btn:hover {
    background: #9a453e;
    border-color: #9a453e;
    box-shadow: none;
    color: #fff;
    transform: none;
}

.announcement-heading {
    align-items: center;
    color: #fff;
    display: flex;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 800;
    gap: 0.65rem;
    margin: 0 0 0.85rem;
    text-shadow: 0 2px 10px rgba(4, 51, 60, 0.2);
}

.announcement-heading i {
    color: var(--politef-yellow);
}

.dashboard-page #announcementCarousel {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: var(--politef-radius-lg);
    box-shadow: var(--politef-shadow-lg);
    overflow: hidden;
    padding: 0;
}

.dashboard-page #announcementCarousel .carousel-item {
    min-height: 0;
}

.dashboard-page #announcementCarousel .carousel-item .card {
    background: transparent;
    border: 0;
    min-height: 0;
}

.dashboard-page #announcementCarousel .carousel-item img {
    background: #eef5f4;
    border-radius: 0;
    height: clamp(220px, 34vw, 340px);
    max-height: none;
    object-fit: contain;
    padding: 0.75rem;
    width: 100%;
}

.dashboard-page #announcementCarousel .card-body {
    max-height: none;
    overflow: visible;
    padding: 1.35rem clamp(1.25rem, 4vw, 2rem) 1rem;
}

.dashboard-page #announcementCarousel .card-title {
    color: var(--politef-blue-dark);
    font-size: 1.15rem;
    line-height: 1.35;
}

.dashboard-page #announcementCarousel .card-text {
    color: #465c64;
    font-size: 0.92rem;
    line-height: 1.65;
    margin-bottom: 0;
}

.dashboard-page #announcementCarousel .card-footer {
    background: #f7fbfb;
    border-top: 1px solid var(--politef-line);
    padding: 0.8rem clamp(1.25rem, 4vw, 2rem);
}

.dashboard-page #announcementCarousel .carousel-control-prev,
.dashboard-page #announcementCarousel .carousel-control-next {
    height: 64px;
    opacity: 1;
    top: 135px;
    width: 52px;
}

.dashboard-page #announcementCarousel .carousel-control-prev-icon,
.dashboard-page #announcementCarousel .carousel-control-next-icon {
    background-color: rgba(8, 77, 112, 0.82);
    background-size: 55%;
    border: 2px solid rgba(255, 255, 255, 0.72);
    height: 40px;
    width: 40px;
}

.empty-announcements {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--politef-radius);
    color: var(--politef-muted);
    margin: 0;
    padding: 1.25rem;
}

.dashboard-page .admin-card {
    border-radius: var(--politef-radius);
    box-shadow: var(--politef-shadow-sm);
}

/* Calificaciones y pagos */
.grades-page,
.payments-page {
    background:
        radial-gradient(circle at 10% 5%, rgba(16, 169, 165, 0.13), transparent 24rem),
        radial-gradient(circle at 95% 10%, rgba(23, 111, 165, 0.1), transparent 22rem),
        var(--politef-canvas);
    color: var(--politef-ink);
    min-height: 100vh;
    min-height: 100svh;
}

.grades-page {
    display: flex;
    flex-direction: column;
}

.grades-shell,
.payments-page .card-container {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--politef-line);
    border-radius: var(--politef-radius-lg);
    box-shadow: var(--politef-shadow-sm);
}

.grades-shell {
    margin: clamp(1.25rem, 4vw, 3rem) auto;
    max-width: 1140px;
    padding: clamp(1.1rem, 3vw, 2rem);
    width: calc(100% - 2rem);
}

.page-heading {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.page-heading h1,
.payments-page .card-container h1,
.payments-page .card-container h2 {
    color: var(--politef-blue-dark);
    font-size: clamp(1.55rem, 4vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.15;
    margin: 0;
}

.page-heading p {
    color: var(--politef-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0.45rem 0 0;
}

.grades-page .btn-primary {
    align-items: center;
    background: var(--politef-blue);
    border-color: var(--politef-blue);
    border-radius: 13px;
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 700;
    gap: 0.45rem;
    min-height: 46px;
    padding: 0.65rem 0.95rem;
}

.mobile-table-hint {
    align-items: center;
    background: #edf8f7;
    border-radius: 10px;
    color: var(--politef-teal-dark);
    display: none;
    font-size: 0.78rem;
    font-weight: 650;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    padding: 0.65rem 0.75rem;
}

.grades-page .table-responsive {
    border: 1px solid var(--politef-line);
    border-radius: 16px;
    box-shadow: inset 0 -10px 20px -24px rgba(0, 0, 0, 0.4);
    margin: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.grades-page table {
    border: 0;
    margin: 0;
    min-width: 680px;
    table-layout: auto;
}

.grades-page .table > :not(caption) > * > * {
    border-color: var(--politef-line);
    padding: 0.9rem 1rem;
    vertical-align: middle;
}

.grades-page .table thead th {
    background: var(--politef-blue-dark);
    border-color: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 750;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.grades-page .table tbody td {
    color: #314a53;
    font-size: 0.9rem;
}

.grades-page .table tbody td:first-child,
.grades-page .table thead th:first-child {
    left: 0;
    min-width: 220px;
    position: sticky;
    text-align: left;
    z-index: 2;
}

.grades-page .table tbody td:first-child {
    background: #fff;
    box-shadow: 7px 0 14px -14px rgba(5, 61, 78, 0.9);
    color: var(--politef-ink);
    font-weight: 700;
}

.grades-page .table-striped > tbody > tr:nth-of-type(odd) > td:first-child {
    background: #f6faf9;
}

.grades-page .page-actions {
    border-top: 1px solid var(--politef-line);
    margin-top: 1.5rem;
    padding-top: 1.25rem;
}

.restricted-state {
    align-items: center;
    display: flex;
    flex-direction: column;
    max-width: 680px;
    text-align: center;
}

.restricted-state h1 {
    color: var(--politef-blue-dark);
    font-size: clamp(1.65rem, 5vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.035em;
}

.restricted-state > p:not(.section-eyebrow) {
    color: var(--politef-muted);
    line-height: 1.65;
    margin: 0.5rem auto 1.5rem;
    max-width: 540px;
}

.restricted-icon {
    align-items: center;
    background: #fff4d5;
    border: 1px solid #f0db9a;
    border-radius: 50%;
    color: #996b00;
    display: flex;
    font-size: 1.6rem;
    height: 64px;
    justify-content: center;
    margin-bottom: 1.15rem;
    width: 64px;
}

.grades-page .btn-secondary,
.payments-page .btn-outline-secondary {
    align-items: center;
    background: #fff;
    border: 1px solid #bfd1d0;
    border-radius: 13px;
    color: #3d5b63;
    display: inline-flex;
    font-weight: 700;
    gap: 0.35rem;
    min-height: 46px;
    padding: 0.65rem 1rem;
}

.grades-page .btn-secondary:hover,
.payments-page .btn-outline-secondary:hover {
    background: #edf5f4;
    border-color: #a9c5c2;
    color: var(--politef-ink);
}

.payments-page {
    background-attachment: scroll;
    display: flex;
    flex-direction: column;
}

.payments-page > .container {
    margin-inline: auto;
    max-width: 1100px;
    padding-inline: 1rem;
    width: 100%;
}

.payments-page > .container > .row {
    margin-inline: 0;
}

.payments-page .card-container {
    margin: clamp(1.25rem, 4vw, 3rem) 0;
    max-width: 900px;
    padding: clamp(1.1rem, 3vw, 2.25rem);
    width: 100%;
}

.payments-page .last-update {
    border-bottom: 1px solid var(--politef-line);
    color: var(--politef-muted);
    font-size: 0.82rem;
    margin: 0.65rem 0 1.25rem;
    padding-bottom: 1rem;
    text-align: left;
}

.payments-page .last-update .bi {
    color: var(--politef-teal-dark);
}

.payments-page .clabe-info-box {
    background: linear-gradient(135deg, #edf8f7, #f5fbfb);
    border: 1px solid #cfe8e4;
    border-left: 5px solid var(--politef-teal);
    border-radius: 14px;
    margin: 1.25rem 0;
    padding: 1rem 1.15rem;
    text-align: left;
}

.payments-page .clabe-info-box::before {
    color: var(--politef-teal-dark);
    content: "Datos para transferencia";
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    margin-bottom: 0.45rem;
    text-transform: uppercase;
}

.payments-page .clabe-info-box p {
    color: #3a555d;
    font-size: 0.84rem;
    margin: 0;
}

.payments-page .clabe-info-box .clabe-number {
    color: var(--politef-blue-dark);
    display: block;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: clamp(0.9rem, 3.6vw, 1.15rem);
    font-weight: 800;
    letter-spacing: 0.025em;
    margin-top: 0.35rem;
    overflow-wrap: anywhere;
}

.payments-page .table-responsive {
    border: 1px solid var(--politef-line);
    border-radius: 16px;
    margin: 0;
    overflow: hidden;
}

.payments-page .table {
    border: 0;
    border-collapse: collapse;
    border-radius: 0;
    margin: 0;
    table-layout: auto;
}

.payments-page .table thead.table-dark th {
    background: var(--politef-blue-dark);
    border-color: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 750;
    padding: 0.85rem 0.75rem;
}

.payments-page .table tbody td {
    border-color: var(--politef-line);
    color: #344f58;
    font-size: 0.86rem;
    padding: 0.85rem 0.75rem;
}

.payments-page .actions-toolbar {
    border-top: 1px solid var(--politef-line);
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
}

.payments-page .btn-danger {
    align-items: center;
    background: var(--politef-blue);
    border: 1px solid var(--politef-blue);
    border-radius: 13px;
    display: inline-flex;
    font-weight: 700;
    gap: 0.35rem;
    min-height: 46px;
    padding: 0.65rem 1rem;
}

.payments-page .btn-danger:hover {
    background: var(--politef-blue-dark);
    border-color: var(--politef-blue-dark);
    box-shadow: none;
    transform: none;
}

.payments-page .footer {
    background: var(--politef-blue-dark);
    color: rgba(255, 255, 255, 0.78);
    margin-top: auto;
    padding: 1.15rem 1rem;
}

.payments-page .footer a {
    color: #fff;
}

/* Avisos móviles y accesibilidad */
.dashboard-page .marquee-banner-wrapper,
.payments-page .marquee-banner-wrapper {
    margin-inline: auto;
    max-width: 1140px;
}

@media (max-width: 991.98px) {
    .login-page .login-container {
        gap: 2rem;
        grid-template-columns: minmax(0, 1fr) minmax(340px, 410px);
    }

    .login-benefits {
        display: none;
    }

    .dashboard-page .dashboard-card {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .portal-navbar {
        min-height: 64px;
        padding: 0.45rem 0;
    }

    .portal-navbar .container-fluid {
        padding-inline: 0.85rem;
    }

    .portal-navbar .navbar-brand img {
        height: 42px;
        width: 70px;
    }

    .brand-copy span {
        display: none;
    }

    .brand-copy strong {
        font-size: 0.76rem;
        max-width: 140px;
    }

    .user-chip {
        background: transparent;
        border: 0;
        max-width: 38vw;
        padding: 0.4rem 0;
    }

    .login-page .login-container {
        display: block;
        padding: 1rem;
    }

    .login-intro {
        display: none;
    }

    .login-panel {
        align-items: center;
        display: flex;
        min-height: calc(100svh - 70px);
    }

    .login-page .login-box {
        border-radius: 24px;
        padding: 1.35rem;
    }

    .login-mobile-logo {
        align-items: center;
        display: flex;
        gap: 0.75rem;
        margin-bottom: 1.35rem;
    }

    .login-mobile-logo img {
        height: 54px;
        object-fit: contain;
        width: 92px;
    }

    .login-mobile-logo strong,
    .login-mobile-logo span {
        display: block;
    }

    .login-mobile-logo strong {
        color: var(--politef-blue-dark);
        font-size: 0.88rem;
        font-weight: 800;
    }

    .login-mobile-logo span {
        color: var(--politef-muted);
        font-size: 0.72rem;
        margin-top: 0.15rem;
    }

    .login-card-copy {
        margin-bottom: 1.35rem;
    }

    .dashboard-page .main-content {
        padding-top: 1rem;
    }

    .dashboard-page .main-content > .container {
        padding-inline: 0.85rem;
    }

    .dashboard-page .row.g-4 {
        --bs-gutter-y: 1.25rem;
    }

    .dashboard-page .dashboard-card {
        border-radius: 22px;
        padding: 1.15rem;
    }

    .dashboard-page .dashboard-btn-link {
        min-height: 70px;
    }

    .announcement-heading {
        margin-left: 0.2rem;
    }

    .dashboard-page #announcementCarousel {
        border-radius: 22px;
    }

    .dashboard-page #announcementCarousel .carousel-item img {
        height: min(62vw, 260px);
        padding: 0.5rem;
    }

    .dashboard-page #announcementCarousel .carousel-control-prev,
    .dashboard-page #announcementCarousel .carousel-control-next {
        top: 92px;
    }

    .dashboard-page .marquee-banner .marquee-track,
    .payments-page .marquee-banner .marquee-track {
        animation-duration: 28s;
    }

    .page-heading {
        display: block;
    }

    .page-heading .btn {
        margin-top: 1rem;
        width: 100%;
    }

    .mobile-table-hint {
        display: flex;
    }

    .grades-page .table tbody td:first-child,
    .grades-page .table thead th:first-child {
        min-width: 185px;
    }

    .grades-page .page-actions .btn {
        justify-content: center;
        width: 100%;
    }

    .payments-page .card-container {
        border-radius: 22px;
    }

    .payments-page .table-responsive {
        background: transparent;
        border: 0;
        overflow: visible;
    }

    .payments-page .table,
    .payments-page .table tbody,
    .payments-page .table tr,
    .payments-page .table td {
        display: block;
        width: 100%;
    }

    .payments-page .table thead {
        border: 0;
        clip: rect(0 0 0 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        white-space: nowrap;
        width: 1px;
    }

    .payments-page .table tbody tr {
        background: #fff;
        border: 1px solid var(--politef-line);
        border-radius: 16px;
        box-shadow: 0 6px 16px rgba(12, 73, 79, 0.06);
        margin-bottom: 0.85rem;
        overflow: hidden;
        padding: 0.35rem 0.85rem;
    }

    .payments-page .table tbody td,
    .payments-page .table tbody td:nth-child(2),
    .payments-page .table tbody td:nth-child(3),
    .payments-page .table tbody td:nth-child(4) {
        align-items: flex-start;
        background: transparent;
        border: 0;
        border-bottom: 1px solid #edf2f1;
        display: flex;
        font-size: 0.86rem;
        gap: 1rem;
        justify-content: space-between;
        padding: 0.75rem 0;
        text-align: right;
        word-break: normal;
    }

    .payments-page .table tbody td:last-child {
        border-bottom: 0;
    }

    .payments-page .table tbody td::before {
        color: var(--politef-muted);
        content: attr(data-label);
        flex: 0 0 42%;
        font-size: 0.74rem;
        font-weight: 750;
        letter-spacing: 0.02em;
        text-align: left;
        text-transform: uppercase;
    }

    .payments-page .actions-toolbar {
        flex-direction: column-reverse;
    }

    .payments-page .actions-toolbar .btn {
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 420px) {
    .brand-copy {
        display: none;
    }

    .user-chip {
        max-width: 54vw;
    }

    .login-page .login-container {
        padding: 0.65rem;
    }

    .login-page .login-box {
        border-radius: 20px;
        padding: 1.15rem;
    }

    .login-page .login-box h2 {
        font-size: 1.55rem;
    }

    .login-page .footer {
        font-size: 0.7rem;
    }

    .dashboard-page .dashboard-btn-link {
        gap: 0.7rem;
        grid-template-columns: 44px minmax(0, 1fr) auto;
        padding-inline: 0.65rem;
    }

    .action-icon {
        border-radius: 12px;
        height: 44px;
        width: 44px;
    }

    .action-copy small {
        font-size: 0.71rem;
    }

    .grades-shell {
        margin-block: 0.85rem;
        width: calc(100% - 1rem);
    }

    .payments-page > .container {
        padding-inline: 0.5rem;
    }

    .payments-page .card-container {
        margin-block: 0.85rem;
        padding: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .marquee-track,
    .marquee-badge-critico,
    .spinner-ring {
        animation: none !important;
    }
}
