body {
    font-family: Calibri, "Segoe UI", Arial, sans-serif;
    background: linear-gradient(180deg, #f4f8fb 0%, #e8eef6 100%);
    color: #1f3349;
}

button,
input,
select,
textarea,
.btn,
.form-control,
.form-select,
.dropdown-menu,
.table {
    font-family: Calibri, "Segoe UI", Arial, sans-serif;
}
body > .container-fluid {
    padding-right: 0;
    padding-left: 0;
}
.app-navbar {
    background: linear-gradient(90deg, #176b98 0%, #1e88b8 48%, #2aa7c9 100%);
    border-bottom: 3px solid rgba(255, 255, 255, 0.28);
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1100;
}
.app-navbar > .container-fluid {
    padding-right: 1cm;
    padding-left: 1cm;
}
.app-page {
    width: calc(100% - 2cm);
    max-width: none;
    margin-right: 1cm;
    margin-left: 1cm;
    padding: 5.4rem 0 1.5rem;
}
.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}
.app-brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    object-fit: contain;
    padding: 0.2rem;
}
.app-navbar .nav-link {
    border-radius: 0.35rem;
    margin-inline: 0.1rem;
    padding-inline: 0.8rem;
    color: rgba(255, 255, 255, 0.92);
    transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.app-navbar .nav-link:hover,
.app-navbar .nav-link:focus {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    transform: translateY(-1px);
}
.app-navbar .nav-link.app-logout-link {
    background: #ffffff;
    color: #ffc107;
    border: 1px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 0.35rem 0.8rem rgba(31, 51, 73, 0.16);
}
.app-navbar .nav-link.app-logout-link:hover,
.app-navbar .nav-link.app-logout-link:focus {
    background: #ffffff;
    color: #ffc107;
    box-shadow: 0 0.45rem 1rem rgba(31, 51, 73, 0.22);
}
.app-navbar .navbar-brand {
    color: #ffffff;
}
.login-page {
    min-height: 100dvh;
    overflow-x: hidden;
    background: #061d4a;
}
.login-background {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 86% 12%, rgba(0, 202, 255, 0.62), transparent 28rem),
        linear-gradient(90deg, rgba(5, 24, 70, 0.98) 0%, rgba(5, 24, 70, 0.76) 34%, rgba(10, 126, 205, 0.34) 100%),
        url("../img/login-campus.jpeg") center / cover no-repeat;
}
.login-background::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(2, 13, 45, 0.08), rgba(3, 25, 75, 0.46)),
        radial-gradient(circle at 11% 8%, transparent 0 11rem, rgba(255, 255, 255, 0.14) 11.1rem 11.18rem, transparent 11.3rem);
}
.login-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(18rem, 0.86fr) minmax(22rem, 1fr);
    grid-template-rows: 1fr auto auto;
    gap: clamp(1rem, 3vw, 3rem);
    min-height: 100dvh;
    padding: clamp(1rem, 3vw, 3rem) clamp(1rem, 5vw, 5rem) 1.4rem;
}
.login-brand-panel {
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-brand-content {
    max-width: 26rem;
    color: #ffffff;
    text-align: center;
}
.login-logo {
    width: clamp(7rem, 10vw, 10rem);
    height: clamp(7rem, 10vw, 10rem);
    object-fit: contain;
    margin-bottom: 1.55rem;
    filter: drop-shadow(0 1rem 1.8rem rgba(0, 0, 0, 0.38));
}
.login-welcome {
    margin: 0 0 0.8rem;
    color: #50d8ff;
    font-size: 1.05rem;
}
.login-brand-content h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: 0;
}
.login-brand-content h1 span {
    display: block;
    color: #4bd8ff;
}
.login-brand-copy {
    max-width: 22rem;
    margin: 1.35rem auto 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.03rem;
    line-height: 1.65;
}
.login-access-panel {
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-card {
    width: min(100%, 31rem);
    padding: clamp(1.4rem, 3vw, 2.7rem);
    border: 1px solid rgba(255, 255, 255, 0.46);
    border-radius: 1.35rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.57), rgba(255, 255, 255, 0.25));
    box-shadow: 0 1.8rem 4rem rgba(2, 18, 55, 0.38);
    backdrop-filter: blur(16px) saturate(145%);
}
.login-user-icon {
    display: grid;
    place-items: center;
    width: 5.8rem;
    height: 5.8rem;
    margin: 0 auto 1.35rem;
    border: 1px solid rgba(55, 216, 255, 0.85);
    border-radius: 50%;
    background: rgba(241, 252, 255, 0.72);
    box-shadow: 0 0 0 0.45rem rgba(64, 215, 255, 0.16), 0 0.8rem 2rem rgba(0, 104, 180, 0.2);
    color: #2168f3;
    font-size: 2.3rem;
}
.login-card-heading {
    margin-bottom: 1.6rem;
    text-align: center;
}
.login-card-heading h2 {
    margin: 0 0 0.55rem;
    color: #061d4a;
    font-size: 1.9rem;
    font-weight: 900;
    letter-spacing: 0;
}
.login-card-heading p {
    margin: 0;
    color: rgba(6, 29, 74, 0.72);
    font-weight: 600;
}
.login-form {
    display: grid;
    gap: 1.05rem;
}
.login-field .form-label {
    margin-bottom: 0.45rem;
    color: #081f52;
    font-weight: 800;
}
.login-input-wrap {
    display: grid;
    grid-template-columns: 2.6rem 1fr auto;
    align-items: center;
    min-height: 3.65rem;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    overflow: hidden;
}
.login-input-wrap > i {
    color: #1f65f2;
    font-size: 1.25rem;
    text-align: center;
}
.login-input-wrap .form-control {
    min-height: 3.55rem;
    border: 0;
    background: transparent;
    color: #071d48;
    font-weight: 600;
    box-shadow: none;
}
.login-input-wrap .form-control::placeholder {
    color: rgba(7, 29, 72, 0.48);
}
.login-password-toggle {
    width: 3.2rem;
    height: 3.55rem;
    border: 0;
    background: transparent;
    color: #35547f;
    font-size: 1.2rem;
}
.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: #102553;
    font-weight: 700;
}
.login-remember {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}
.login-remember input {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: #2563ff;
}
.login-muted-link {
    color: #2563ff;
    text-align: right;
}
.login-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    min-height: 3.65rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 0.75rem;
    background: linear-gradient(100deg, #3157ff 0%, #00c8ee 100%);
    box-shadow: 0 0.9rem 1.7rem rgba(0, 105, 229, 0.28);
    color: #ffffff;
    font-size: 1.08rem;
    font-weight: 900;
}
.login-submit:hover,
.login-submit:focus {
    color: #ffffff;
    filter: brightness(1.04);
}
.login-divider {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: rgba(7, 29, 72, 0.74);
    font-weight: 700;
}
.login-divider::before,
.login-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: rgba(7, 29, 72, 0.24);
}
.login-home-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 3.45rem;
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.26);
    color: #245cff;
    font-weight: 900;
}
.login-home-link:hover,
.login-home-link:focus {
    border-color: rgba(37, 99, 255, 0.55);
    background: rgba(255, 255, 255, 0.42);
    color: #113ad2;
}
.login-alert {
    border: 1px solid rgba(255, 171, 179, 0.8);
    border-radius: 0.75rem;
    background: rgba(255, 232, 235, 0.86);
}
.login-benefits {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    align-items: center;
    margin-top: auto;
}
.login-benefit {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 4.25rem;
    padding: 0.6rem 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff;
}
.login-benefit:last-child {
    border-right: 0;
}
.login-benefit > i {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: rgba(40, 108, 255, 0.2);
    color: #62b9ff;
    font-size: 1.55rem;
}
.login-benefit strong,
.login-benefit span {
    display: block;
}
.login-benefit strong {
    font-weight: 900;
}
.login-benefit span {
    margin-top: 0.25rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
}
.login-footer-text {
    grid-column: 1 / -1;
    margin: 0.35rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    text-align: center;
    font-size: 0.92rem;
    font-weight: 500;
}
.btn i {
    margin-right: 0.35rem;
}
.btn .bi-eye,
.btn .bi-eye-slash {
    margin-right: 0;
}
.btn {
    border-radius: 0.45rem;
    font-weight: 600;
}
.btn-icon {
    width: 2.15rem;
    height: 2.15rem;
    display: inline-grid;
    place-items: center;
    padding: 0;
}
.btn-icon i {
    margin-right: 0;
}
.action-icon-group {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}
.action-icon-group form {
    display: inline-flex;
    margin: 0;
}
.rut-cell {
    min-width: 7.8rem;
    white-space: nowrap;
}
.btn-success {
    border-color: #157ea8;
    background: linear-gradient(180deg, #1d9dcc 0%, #157ea8 100%);
    color: #ffffff;
}
.btn-success:hover,
.btn-success:focus {
    border-color: #116a8f;
    background: linear-gradient(180deg, #22abd9 0%, #116f96 100%);
    color: #ffffff;
}
.btn-outline-success {
    border-color: #1685b1;
    color: #126f96;
}
.btn-outline-success:hover,
.btn-outline-success:focus {
    border-color: #1685b1;
    background: #1685b1;
    color: #ffffff;
}
.login-home-link {
    order: 2;
    background: rgba(255, 255, 255, 0.72);
}
.text-success {
    color: #126f96 !important;
}
.bg-success {
    background-color: #1685b1 !important;
}
.alert-success {
    border-color: #9ed9ee;
    background-color: #e8f8fd;
    color: #0d526f;
}
.table-success {
    --bs-table-bg: #d9f0f8;
    --bs-table-color: #123c55;
    --bs-table-border-color: #abd7e8;
}
.card {
    border-radius: 0.75rem;
}
.admin-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
    margin-right: 0;
    margin-left: 0;
}
.admin-dashboard-stats > [class*="col-"] {
    width: auto;
    max-width: none;
    padding-right: 0;
    padding-left: 0;
}
.admin-dashboard-stat-card .card-title {
    margin-bottom: 0.45rem;
    line-height: 1.2;
}
.admin-dashboard-stat-card .display-6 {
    margin-bottom: 0.35rem;
    line-height: 1.05;
}
.navbar-brand,
.nav-link {
    font-weight: 600;
}
.table-schedule {
    border-collapse: separate;
    border-spacing: 0;
}
.table-schedule th,
.table-schedule td {
    border: 1px solid #dbe7d8;
}
.table-schedule th {
    background: #176b98;
    color: #ffffff;
    text-align: center;
    vertical-align: middle;
}
.table-schedule td {
    min-width: 180px;
    padding: 0.65rem;
    vertical-align: middle;
}
.schedule-block {
    cursor: pointer;
    transition: transform .15s ease, background-color .15s ease;
}
.schedule-block:hover {
    transform: translateY(-1px);
}
.schedule-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.schedule-card {
    --schedule-accent: #1d9dcc;
    --schedule-soft: #eefaff;
    display: flex;
    position: relative;
    overflow: hidden;
    min-height: 170px;
    flex-direction: column;
    justify-content: space-between;
    border: 2px solid var(--schedule-accent);
    border-left-width: 0.55rem;
    border-radius: 0.75rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.92)),
        linear-gradient(135deg, var(--schedule-soft), #ffffff 58%);
    padding: 1rem;
    box-shadow: 0 0.45rem 1.15rem rgba(31, 51, 73, 0.12);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.schedule-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 0.32rem;
    background: var(--schedule-accent);
}
.schedule-card.schedule-block:hover {
    transform: translateY(-2px);
    border-color: var(--schedule-accent);
    box-shadow: 0 0.85rem 1.6rem rgba(29, 157, 204, 0.18);
}
.schedule-card-header {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    justify-content: space-between;
}
.schedule-card-title {
    font-weight: 700;
    color: #123c55;
}
.schedule-card-time {
    margin-top: 0.2rem;
    font-size: 0.95rem;
    color: #365437;
}
.schedule-card-date {
    margin: 0.9rem 0;
    color: #3c5140;
    font-size: 0.95rem;
}
.schedule-card-body {
    min-height: 2.25rem;
}
.schedule-card-hours {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 0.85rem;
}
.schedule-card-hour {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.7rem;
    align-items: center;
    border: 1px solid #d7e7ee;
    border-radius: 0.55rem;
    background: #ffffff;
    padding: 0.5rem 0.6rem;
}
.schedule-card-hour strong,
.schedule-card-hour span,
.schedule-card-hour small {
    display: block;
}
.schedule-card-hour strong {
    color: #123c55;
    font-size: 0.88rem;
}
.schedule-card-hour span {
    color: #365437;
    font-size: 0.82rem;
}
.schedule-card-hour__status {
    text-align: right;
}
.schedule-card-hour__status span {
    color: #1f3349;
    font-weight: 700;
}
.schedule-card-hour__status small {
    color: #607487;
    font-size: 0.74rem;
}
.schedule-card-hour.is-free {
    border-color: #bfe7d3;
    background: #f5fff9;
}
.schedule-card-hour.is-reserved {
    border-color: #f3bdc5;
    background: #fff5f6;
}
.schedule-card-hour.is-owned {
    border-color: #b7d9ee;
    background: #f1f8ff;
}
.schedule-card-disabled,
.schedule-card-closed {
    --schedule-accent: #94a3b8;
    --schedule-soft: #f1f5f9;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.96)),
        linear-gradient(135deg, var(--schedule-soft), #ffffff 60%);
    color: #66716a;
}
.schedule-card-reserved {
    --schedule-accent: #dc3545;
    --schedule-soft: #fff1f2;
}
.schedule-card-owned {
    --schedule-accent: #1685b1;
    --schedule-soft: #ecfeff;
}
.schedule-card-partial {
    --schedule-accent: #f59e0b;
    --schedule-soft: #fff7ed;
}
#adminReservationHourChoiceWrap {
    display: none;
}
.block-disabled {
    background-color: #f0f0f0;
    color: #6c757d;
    cursor: not-allowed;
}
.block-closed {
    background-color: #dee2e6;
    color: #6c757d;
}
.block-reserved {
    background-color: #dc3545;
    color: #ffffff;
}
.block-owned {
    background-color: #1685b1;
    color: #ffffff;
}
.block-free {
    background-color: #ffffff;
}
.block-label {
    background: #e8f8fd;
    font-weight: 700;
}
.modal-backdrop {
    z-index: 1150;
}
.modal {
    z-index: 1160;
}
.weekly-calendar-modal {
    z-index: 1210;
}
.weekly-calendar-modal .modal-content {
    max-height: calc(100dvh - 2rem);
    border: 0;
    border-radius: 0.85rem;
    background: #f8fafc;
    box-shadow: 0 1.25rem 3rem rgba(15, 23, 42, 0.24);
}
.weekly-calendar-modal .modal-dialog {
    width: calc(100vw - 2rem);
    max-width: 1280px;
    margin-top: 1rem;
    margin-bottom: 1rem;
}
.weekly-calendar-modal .modal-header {
    align-items: center;
    gap: 1rem;
    min-height: 4.2rem;
    border-bottom: 1px solid #dbe5ef;
    background: #ffffff;
    border-radius: 0.85rem 0.85rem 0 0;
    padding: 1.1rem 1.25rem;
}
.weekly-calendar-modal .modal-header > div {
    min-width: 0;
}
.weekly-calendar-modal .btn-close {
    flex: 0 0 auto;
    margin: 0;
    opacity: 0.75;
}
.weekly-calendar-modal .btn-close:hover,
.weekly-calendar-modal .btn-close:focus {
    opacity: 1;
}
.weekly-calendar-modal .modal-body {
    min-height: 0;
    padding: 0.85rem 1rem;
}
.weekly-calendar-modal .modal-footer {
    border-top: 1px solid #dbe5ef;
    background: #ffffff;
    border-radius: 0 0 0.85rem 0.85rem;
}
.weekly-calendar-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 0.85rem;
    padding: 0.85rem;
    border: 1px solid #d5e0ea;
    border-radius: 0.75rem;
    background: #ffffff;
}
.weekly-calendar-toolbar__select {
    flex: 1 1 18rem;
}
.weekly-calendar-toolbar label {
    margin-bottom: 0.3rem;
    color: #12324c;
    font-weight: 800;
}
.weekly-calendar-toolbar__actions {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
}
.weekly-calendar-toolbar__actions .btn {
    min-height: 2.4rem;
    border-radius: 0.55rem;
    font-weight: 700;
}
.weekly-calendar-toolbar__actions .btn:not(.btn-success) {
    width: 2.65rem;
    padding-right: 0;
    padding-left: 0;
}
.weekly-calendar-print-header {
    display: none;
}
.weekly-calendar-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #d5e0ea;
    border-radius: 0.75rem;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}
.weekly-calendar-table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    background: #ffffff;
    color: #1f3349;
    font-family: inherit;
}
.weekly-calendar-table th,
.weekly-calendar-table td {
    height: 48px;
    border-right: 1px solid #d5e0ea;
    border-bottom: 1px solid #d5e0ea;
    padding: 0.4rem 0.5rem;
    vertical-align: middle;
}
.weekly-calendar-col-index {
    width: 2.35rem;
}
.weekly-calendar-col-time {
    width: 6.2rem;
}
.weekly-calendar-col-day {
    width: calc((100% - 8.55rem) / 5);
}
.weekly-calendar-table th:last-child,
.weekly-calendar-table td:last-child {
    border-right: 0;
}
.weekly-calendar-table tbody tr:last-child th,
.weekly-calendar-table tbody tr:last-child td {
    border-bottom: 0;
}
.weekly-calendar-table thead th {
    background: #eef5fb;
    color: #1f3349;
    text-align: center;
    font-weight: 700;
}
.weekly-calendar-table .weekly-calendar-day {
    background: #dcecf7;
    color: #123c55;
    letter-spacing: 0;
}
.weekly-calendar-month-row th {
    height: 34px;
    padding: 0;
    background: #123c55;
    color: #ffffff;
    font-size: 0.95rem;
}
.weekly-calendar-month-row th:first-child {
    background: #eef5fb;
}
.weekly-calendar-index {
    width: 2.35rem;
    min-width: 2.35rem;
    max-width: 2.35rem;
    padding-right: 0.2rem !important;
    padding-left: 0.2rem !important;
    text-align: center;
    color: #41566b;
}
.weekly-calendar-time-heading {
    width: 6.2rem;
}
.weekly-calendar-time {
    width: 6.2rem;
    min-width: 6.2rem;
    max-width: 6.2rem;
    text-align: center;
    white-space: nowrap;
    color: #263f58;
    font-weight: 600;
}
.weekly-calendar-break,
.weekly-calendar-break-row .weekly-calendar-time,
.weekly-calendar-break-row .weekly-calendar-index {
    background: #f1f4f7;
    color: #607487;
    font-weight: 700;
}
.weekly-calendar-break {
    text-align: center;
    color: #607487;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
}
.weekly-calendar-reserved,
.weekly-calendar-owned {
    background: #fff7ed;
    border-left: 4px solid #f59e0b;
    color: #1f3349;
    font-size: 0.78rem;
    line-height: 1.2;
}
.weekly-calendar-owned {
    background: #eef6ff;
    border-left-color: #2f80c2;
}
.weekly-calendar-reserved strong,
.weekly-calendar-reserved span,
.weekly-calendar-owned strong,
.weekly-calendar-owned span,
.weekly-calendar-owned em {
    display: block;
}
.weekly-calendar-owned em {
    color: #1f6ca8;
    font-style: normal;
    font-weight: 700;
}
.weekly-calendar-free {
    background: #ffffff;
}
.weekly-calendar-table tbody tr:hover .weekly-calendar-free {
    background: #f8fafc;
}
@media print {
    @page {
        size: landscape;
        margin: 10mm;
    }

    body.weekly-calendar-print-mode {
        background: #ffffff !important;
    }

    body.weekly-calendar-print-mode .container-fluid,
    body.weekly-calendar-print-mode .modal-backdrop,
    body.weekly-calendar-print-mode script {
        display: none !important;
    }

    body.weekly-calendar-print-mode .weekly-calendar-modal {
        position: static !important;
        display: block !important;
        overflow: visible !important;
        padding: 0 !important;
        opacity: 1 !important;
    }

    body.weekly-calendar-print-mode .weekly-calendar-modal .modal-dialog {
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        transform: none !important;
    }

    body.weekly-calendar-print-mode .weekly-calendar-modal .modal-content {
        border: 0 !important;
        border-radius: 0 !important;
        background: #ffffff !important;
        box-shadow: none !important;
    }

    body.weekly-calendar-print-mode .weekly-calendar-modal .modal-header,
    body.weekly-calendar-print-mode .weekly-calendar-modal .modal-body {
        display: block !important;
        padding: 0 !important;
        border: 0 !important;
        background: #ffffff !important;
    }

    body.weekly-calendar-print-mode .weekly-calendar-modal .modal-header,
    body.weekly-calendar-print-mode .weekly-calendar-toolbar,
    body.weekly-calendar-print-mode .weekly-calendar-modal .modal-footer {
        display: none !important;
    }

    body.weekly-calendar-print-mode .weekly-calendar-print-header {
        display: grid !important;
        grid-template-columns: 72px 1fr;
        gap: 14px;
        align-items: center;
        margin-bottom: 12px;
        padding-bottom: 10px;
        border-bottom: 3px solid #1b7f45;
        color: #163047;
    }

    body.weekly-calendar-print-mode .weekly-calendar-print-header img {
        width: 68px;
        height: 68px;
        object-fit: contain;
    }

    body.weekly-calendar-print-mode .weekly-calendar-print-header strong,
    body.weekly-calendar-print-mode .weekly-calendar-print-header span {
        display: block;
    }

    body.weekly-calendar-print-mode .weekly-calendar-print-header strong {
        color: #0f5132;
        font-size: 18px;
    }

    body.weekly-calendar-print-mode .weekly-calendar-print-header span {
        color: #526577;
        font-size: 12px;
    }

    body.weekly-calendar-print-mode .weekly-calendar-scroll {
        overflow: visible !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    body.weekly-calendar-print-mode .weekly-calendar-table {
        min-width: 0 !important;
        width: 100% !important;
        table-layout: fixed;
        border-collapse: collapse;
        border-spacing: 0;
        font-size: 10px;
    }

    body.weekly-calendar-print-mode .weekly-calendar-table th,
    body.weekly-calendar-print-mode .weekly-calendar-table td {
        height: 34px;
        padding: 4px;
        border: 1px solid #9eb2c2 !important;
        color: #163047;
    }
}
.reservation-window-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.2rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--reservation-window-border);
    border-left: 0.45rem solid var(--reservation-window-accent);
    border-radius: 0.85rem;
    background: linear-gradient(135deg, var(--reservation-window-bg), #ffffff 72%);
    box-shadow: 0 0.45rem 1.1rem rgba(31, 51, 73, 0.1);
}
.reservation-window-card--closed {
    --reservation-window-accent: #f59e0b;
    --reservation-window-border: #fde68a;
    --reservation-window-bg: #fffbeb;
    color: #713f12;
}
.reservation-window-card--open {
    --reservation-window-accent: #1685b1;
    --reservation-window-border: #a5e7f8;
    --reservation-window-bg: #ecfeff;
    color: #123c55;
}
.reservation-window-card__icon {
    display: inline-grid;
    width: 2.45rem;
    height: 2.45rem;
    flex: 0 0 2.45rem;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: var(--reservation-window-accent);
    font-size: 1.25rem;
}
.reservation-window-card__content {
    min-width: 0;
}
.reservation-window-card__title {
    margin: 0 0 0.25rem;
    font-weight: 800;
    color: inherit;
}
.reservation-window-card__text {
    margin: 0;
    color: inherit;
}
.reservation-window-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.75rem;
}
.reservation-window-card__chips span {
    display: inline-flex;
    align-items: center;
    min-height: 1.9rem;
    padding: 0.25rem 0.6rem;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}
.reservation-note {
    font-size: 0.95rem;
}
.reservation-form-modal {
    z-index: 1200;
}
.reservation-form-modal .modal-dialog {
    max-width: 760px;
}
.reservation-form-modal .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 0.8rem;
    background: #f8fbfd;
    box-shadow: 0 1.2rem 3rem rgba(18, 60, 85, 0.28);
}
.reservation-form-modal__header {
    align-items: center;
    border-bottom: 0;
    background: linear-gradient(135deg, #176b98, #1d9dcc);
    color: #ffffff;
    padding: 1rem 1.15rem;
}
.reservation-form-modal__eyebrow {
    margin: 0 0 0.2rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}
.reservation-form-modal .modal-title {
    font-weight: 800;
}
.reservation-form-modal .modal-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    padding: 1rem 1.15rem;
}
.reservation-form-modal .modal-body > .mb-3 {
    margin-bottom: 0 !important;
}
.reservation-form-modal .modal-body > .mb-3:nth-last-of-type(1) {
    grid-column: 1 / -1;
}
.reservation-form-modal .form-label {
    margin-bottom: 0.25rem;
    color: #27465e;
    font-size: 0.88rem;
    font-weight: 800;
}
.reservation-form-modal .form-control,
.reservation-form-modal .form-select {
    border-color: #c8d9e4;
    background-color: #ffffff;
}
.reservation-form-modal input[readonly] {
    background: #edf7fb;
    color: #123c55;
    font-weight: 400;
}
.reservation-form-modal__footer {
    justify-content: space-between;
    border-top: 1px solid #d9e7ef;
    background: #ffffff;
    padding: 0.85rem 1.15rem;
}
.reservation-expired-modal .modal-content {
    border: 0;
    border-radius: 0.8rem;
    box-shadow: 0 1.2rem 2.8rem rgba(113, 63, 18, 0.22);
}
.reservation-expired-modal .modal-header {
    border-bottom: 1px solid #fde68a;
    background: #fffbeb;
    color: #713f12;
}
.reservation-expired-modal .modal-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
}
.reservation-expired-modal .modal-title i {
    color: #f59e0b;
}
.reserve-slot.disabled,
.reserve-slot:disabled {
    pointer-events: none;
    opacity: 0.65;
}
.badge-status {
    font-size: 0.85rem;
}
.teacher-form .form-control,
.teacher-form .form-select {
    max-width: 100%;
}
.teacher-form .input-group {
    max-width: 18rem;
}
.user-form-card .card-body {
    padding: 1rem;
}
.user-form-card .card-title {
    margin-bottom: 0.65rem;
}
.teacher-form .form-label {
    margin-bottom: 0.25rem;
}
.teacher-form .form-text {
    margin-top: 0.25rem;
    font-size: 0.78rem;
}
.teacher-form #selectedSubjectsList {
    min-height: 1.6rem;
}
.teacher-actions--form {
    margin-top: 0.35rem !important;
}
.teacher-created-modal .modal-content {
    border: 0;
    border-radius: 0.75rem;
    box-shadow: 0 1rem 2.5rem rgba(31, 51, 73, 0.24);
}
.teacher-created-modal .modal-header {
    border-bottom: 1px solid #cfe7f1;
    background: #e8f8fd;
    color: #0d526f;
}
.teacher-created-modal .modal-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
}
.teacher-created-modal .modal-title i {
    color: #1685b1;
}
.user-action-floating-message {
    position: fixed;
    right: 1rem;
    top: calc(1rem + var(--app-safe-top));
    z-index: 5000;
    max-width: min(26rem, calc(100vw - 2rem));
    margin: 0;
    border: 1px solid #9ed9ee;
    border-left: 0.35rem solid #1685b1;
    border-radius: 0.75rem;
    background: #f0fbff;
    box-shadow: 0 1rem 2.4rem rgba(31, 51, 73, 0.22);
    color: #0d526f;
    font-weight: 700;
    padding: 0.9rem 1rem;
    pointer-events: none;
}
.user-action-floating-message::before {
    content: "\F26A";
    display: inline-block;
    margin-right: 0.45rem;
    font-family: "bootstrap-icons";
}
.user-action-floating-message.is-error {
    border-color: #f0b4b9;
    border-left-color: #dc3545;
    background: #fff5f6;
    color: #8a1f2a;
}
.user-action-floating-message.is-error::before {
    content: "\F623";
}
.swal2-container {
    z-index: 6000 !important;
}
.admin-appearance-preview {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
    border: 1px solid #d6e5ee;
    border-radius: 0.7rem;
    background: #ffffff;
    padding: 0.85rem;
}
.admin-appearance-preview img {
    width: 4.25rem;
    height: 4.25rem;
    object-fit: contain;
}
.admin-appearance-preview strong,
.admin-appearance-preview span {
    display: block;
    color: #111827;
}
.admin-appearance-preview span {
    margin-top: 0.15rem;
    font-size: 0.9rem;
}
.teacher-created-access {
    padding: 0.9rem 1rem;
    border: 1px solid #b9d9e7;
    border-radius: 0.6rem;
    background: #f2fbfe;
}
.teacher-created-access code {
    color: #c2185b;
    font-weight: 700;
}
.teacher-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}
.change-password-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}
.admin-config-stack {
    display: grid;
    gap: 1.2rem;
}
.admin-config-menu-card {
    border: 1px solid #d7e7ef;
    border-radius: 0.8rem;
    background: #ffffff;
}
.admin-config-menu-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}
.admin-config-menu {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}
.admin-config-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 3rem;
    border: 1px solid #c7dbe6;
    border-radius: 0.7rem;
    background: #f8fbfd;
    color: #12324c;
    font-weight: 800;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.admin-config-menu-button i {
    color: #0f7198;
    font-size: 1.05rem;
}
.admin-config-menu-button:hover,
.admin-config-menu-button:focus {
    border-color: #85cfe4;
    background: #f0fbfe;
    outline: 0;
}
.admin-config-menu-button.is-active {
    border-color: #1685b1;
    background: #e8f8fd;
    color: #0d526f;
    box-shadow: 0 0.45rem 1rem rgba(22, 133, 177, 0.14);
    transform: translateY(-1px);
}
.admin-config-panel[hidden] {
    display: none !important;
}
.admin-config-card {
    border: 1px solid #d7e7ef;
    border-radius: 0.8rem;
}
.admin-config-head {
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0edf3;
}
.admin-config-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
    color: #0f7198;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.admin-config-table {
    margin-bottom: 0;
}
.admin-config-table thead th {
    border-bottom: 1px solid #d7e7ef;
    background: #f2fbfe;
    color: #12324c;
    font-weight: 800;
}
.admin-config-table tbody td {
    padding: 1rem 0.85rem;
    border-color: #e2edf3;
}
.admin-config-table td:first-child strong,
.admin-config-table td:first-child span {
    display: block;
}
.admin-config-table td:first-child span {
    color: #5a7184;
    font-size: 0.9rem;
}
.admin-config-switch {
    display: inline-grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: center;
    margin: 0;
    cursor: pointer;
}
.admin-config-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.admin-config-switch > span {
    position: relative;
    width: 3.1rem;
    height: 1.65rem;
    border: 1px solid #b9cbd6;
    border-radius: 999px;
    background: #e8f0f5;
    transition: background-color .15s ease, border-color .15s ease;
}
.admin-config-switch > span::after {
    content: "";
    position: absolute;
    top: 0.17rem;
    left: 0.18rem;
    width: 1.18rem;
    height: 1.18rem;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0.18rem 0.45rem rgba(23, 49, 72, 0.22);
    transition: transform .15s ease;
}
.admin-config-switch input:checked + span {
    border-color: #1693b5;
    background: linear-gradient(135deg, #0f8ab7, #25a9b7);
}
.admin-config-switch input:checked + span::after {
    transform: translateX(1.45rem);
}
.admin-config-switch input:focus-visible + span {
    outline: 0.2rem solid rgba(15, 138, 183, 0.22);
    outline-offset: 0.15rem;
}
.admin-config-switch strong {
    color: #17324a;
    font-size: 0.95rem;
}
.admin-config-fixed {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #0f7198;
    font-weight: 800;
}
.admin-config-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}
.admin-config-free-switch {
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid #bfe2ef;
    border-radius: 0.75rem;
    background: #f2fbfe;
}
.admin-config-window-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.85rem;
}
.admin-config-window {
    display: grid;
    gap: 0.8rem;
    min-width: 0;
    margin: 0;
    padding: 0.9rem;
    border: 1px solid #d7e7ef;
    border-radius: 0.75rem;
    background: #ffffff;
}
.admin-config-window legend {
    float: none;
    width: auto;
    margin: 0;
    color: #12324c;
    font-size: 0.96rem;
    font-weight: 800;
}
.admin-config-window--new {
    border-style: dashed;
    background: #f8fbfd;
}
.admin-config-interferiado-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.85rem;
}
.admin-config-interferiado {
    align-content: start;
}
.schedule-card-blocked {
    --schedule-accent: #be123c;
    --schedule-soft: #fff1f2;
}
.schedule-card-hour.is-blocked {
    border-color: #fecdd3;
    background: #fff1f2;
}
.weekly-calendar-blocked {
    background: #fff1f2;
    border-left: 4px solid #be123c;
    color: #7f1d1d;
}
.weekly-calendar-table thead th.weekly-calendar-blocked-heading,
.weekly-calendar-blocked-heading {
    background: #dc2626 !important;
    color: #ffffff !important;
}
.weekly-calendar-blocked-heading span {
    display: block;
    margin-top: 0.12rem;
    color: #ffe4e6;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.1;
}
.weekly-calendar-break.weekly-calendar-blocked {
    background: #fff1f2 !important;
    color: #7f1d1d;
    text-align: left;
}
.weekly-calendar-blocked strong,
.weekly-calendar-blocked span,
.weekly-calendar-blocked em {
    display: block;
}
.weekly-calendar-blocked em {
    color: #9f1239;
    font-style: normal;
    font-weight: 700;
}
.admin-config-field {
    display: grid;
    gap: 0.25rem;
    color: #526b7d;
    font-size: 0.82rem;
    font-weight: 800;
}
.admin-config-time-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}
.admin-config-time-row label {
    display: grid;
    gap: 0.25rem;
    color: #526b7d;
    font-size: 0.82rem;
    font-weight: 800;
}
.admin-config-window small {
    color: #607487;
    font-weight: 700;
}
.admin-config-days {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.admin-config-days label {
    margin: 0;
    cursor: pointer;
}
.admin-config-days input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.admin-config-days span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.35rem 0.6rem;
    border: 1px solid #c8d9e4;
    border-radius: 0.5rem;
    background: #ffffff;
    color: #37546b;
    font-size: 0.82rem;
    font-weight: 800;
}
.admin-config-days input:checked + span {
    border-color: #1693b5;
    background: #e4f7fd;
    color: #0d526f;
}
.admin-config-days input:focus-visible + span {
    outline: 0.2rem solid rgba(15, 138, 183, 0.22);
    outline-offset: 0.12rem;
}
.admin-config-delete {
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
    margin: 0;
    color: #9f1239;
    font-size: 0.85rem;
    font-weight: 800;
}
.admin-config-delete input {
    width: 1rem;
    height: 1rem;
    accent-color: #be123c;
}
.admin-year-tools {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.admin-year-tool {
    display: grid;
    gap: 0.9rem;
    align-content: start;
    min-height: 100%;
    padding: 1rem;
    border: 1px solid #d5e4ec;
    border-radius: 0.8rem;
    background: #f8fbfd;
}
.admin-year-tool--danger {
    border-color: #f1c5c5;
    background: #fff8f8;
}
.admin-year-tool h5 {
    margin: 0 0 0.25rem;
    color: #12324c;
    font-size: 1rem;
    font-weight: 800;
}
.admin-year-tool p {
    margin: 0;
    color: #607487;
    line-height: 1.45;
}
.admin-year-tool-form {
    display: grid;
    grid-template-columns: minmax(8rem, 0.55fr) minmax(12rem, 1fr) auto;
    gap: 0.75rem;
    align-items: end;
}
.admin-year-tool:not(.admin-year-tool--danger) .admin-year-tool-form {
    grid-template-columns: minmax(8rem, 0.4fr) auto;
    justify-content: start;
}
.admin-year-tool-form label {
    color: #12324c;
    font-weight: 800;
}
.admin-year-tool-form .btn {
    min-height: 2.45rem;
    font-weight: 800;
}
.admin-year-status {
    min-height: 1.35rem;
    color: #607487;
    font-size: 0.92rem;
    font-weight: 700;
}
.admin-year-status--working {
    color: #176b98;
}
.admin-year-status--done {
    color: #198754;
}
.admin-year-status--error {
    color: #dc3545;
}
@media (max-width: 992px) {
    .admin-year-tools {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    .admin-config-menu {
        grid-template-columns: 1fr;
    }
    .admin-config-menu-button {
        justify-content: flex-start;
        padding-right: 1rem;
        padding-left: 1rem;
    }
    .admin-year-tool-form,
    .admin-year-tool:not(.admin-year-tool--danger) .admin-year-tool-form {
        grid-template-columns: 1fr;
    }
    .admin-year-tool-form .btn {
        width: 100%;
    }
}

@media (min-width: 769px) {
    .login-page {
        min-height: 100dvh;
        overflow-x: hidden;
        background: #061d4a;
    }

    .login-background {
        position: fixed;
        inset: 0;
        background:
            radial-gradient(circle at 86% 12%, rgba(0, 202, 255, 0.62), transparent 28rem),
            linear-gradient(90deg, rgba(5, 24, 70, 0.98) 0%, rgba(5, 24, 70, 0.76) 34%, rgba(10, 126, 205, 0.34) 100%),
            url("../img/login-campus.jpeg") center / cover no-repeat;
    }

    .login-background::after {
        content: "";
        position: absolute;
        inset: 0;
        background:
            linear-gradient(180deg, rgba(2, 13, 45, 0.08), rgba(3, 25, 75, 0.46)),
            radial-gradient(circle at 11% 8%, transparent 0 11rem, rgba(255, 255, 255, 0.14) 11.1rem 11.18rem, transparent 11.3rem);
    }

    .login-shell {
        position: relative;
        z-index: 1;
        display: grid;
        grid-template-columns: minmax(18rem, 0.86fr) minmax(22rem, 1fr);
        grid-template-rows: 1fr auto auto;
        place-items: initial;
        gap: clamp(0.75rem, 2vw, 1.8rem);
        min-height: 100dvh;
        padding: clamp(0.75rem, 2vh, 1.6rem) clamp(1.5rem, 5vw, 4rem) 0.75rem;
    }

    .login-brand-panel {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .login-benefits {
        grid-column: 1 / -1;
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.65rem;
        align-items: center;
        margin-top: auto;
    }

    .login-access-panel {
        display: flex;
        align-items: center;
        justify-content: center;
        width: auto;
    }

    .login-card {
        width: clamp(21rem, 31.5vw, 27rem);
        padding: clamp(0.78rem, 2vh, 1.35rem) clamp(1rem, 2.5vw, 1.7rem);
        border: 1px solid rgba(255, 255, 255, 0.46);
        border-radius: 1.05rem;
        background: linear-gradient(145deg, rgba(255, 255, 255, 0.57), rgba(255, 255, 255, 0.25));
        box-shadow: 0 1.8rem 4rem rgba(2, 18, 55, 0.38);
        backdrop-filter: blur(16px) saturate(145%);
    }

    .login-card-brand {
        display: none;
    }

    .login-user-icon {
        display: grid;
        width: clamp(3.6rem, 7vh, 4.75rem);
        height: clamp(3.6rem, 7vh, 4.75rem);
        margin: 0 auto clamp(0.45rem, 1.4vh, 0.9rem);
        border: 1px solid rgba(55, 216, 255, 0.85);
        border-radius: 50%;
        background: rgba(241, 252, 255, 0.72);
        box-shadow: 0 0 0 0.35rem rgba(64, 215, 255, 0.14), 0 0.55rem 1.4rem rgba(0, 104, 180, 0.18);
        color: #2168f3;
        place-items: center;
        font-size: clamp(1.55rem, 3.4vh, 2rem);
    }

    .login-card-heading {
        margin-bottom: clamp(0.55rem, 1.5vh, 1.1rem);
        text-align: center;
    }

    .login-card-heading h2 {
        margin-bottom: 0.25rem;
        color: #061d4a;
        font-size: clamp(1.25rem, 2.1vw, 1.75rem);
        font-weight: 900;
    }

    .login-card-heading p {
        color: rgba(6, 29, 74, 0.72);
        font-size: clamp(0.78rem, 1.2vw, 0.92rem);
        font-weight: 600;
    }

    .login-form {
        gap: clamp(0.45rem, 1.3vh, 0.78rem);
    }

    .login-input-wrap {
        min-height: clamp(2.4rem, 6.3vh, 3.35rem);
        border-color: rgba(255, 255, 255, 0.58);
        border-radius: 0.75rem;
        background: rgba(255, 255, 255, 0.78);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    }

    .login-input-wrap > i {
        color: #1f65f2;
    }

    .login-submit {
        min-height: clamp(2.45rem, 6.25vh, 3.35rem);
        border: 1px solid rgba(255, 255, 255, 0.6);
        border-radius: 0.75rem;
        background: linear-gradient(100deg, #3157ff 0%, #00c8ee 100%);
        box-shadow: 0 0.9rem 1.7rem rgba(0, 105, 229, 0.28);
    }

    .login-divider {
        display: flex;
    }

    .login-home-link {
        border: 1px solid rgba(255, 255, 255, 0.52);
        background: rgba(255, 255, 255, 0.26);
        color: #245cff;
    }

    .login-muted-link {
        display: inline;
    }

    .login-footer-text {
        grid-column: 1 / -1;
        width: auto;
        margin: 0;
        color: rgba(255, 255, 255, 0.78);
        text-align: center;
        font-size: clamp(0.72rem, 1vw, 0.84rem);
    }
}

/* Final mobile-only admin user layout */
@media (max-width: 768px) {
    .mobile-user-form-toggle {
        display: inline-flex;
    }

    .user-form-card__close {
        display: grid;
        flex: 0 0 auto;
    }

    .user-form-column {
        display: contents;
    }

    body.mobile-user-form-open {
        overflow: hidden;
    }

    body.mobile-user-form-open::after {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 1310;
        background: rgba(15, 23, 42, 0.48);
        backdrop-filter: blur(4px);
    }

    .user-form-card {
        position: fixed;
        inset: calc(0.55rem + var(--app-safe-top)) calc(0.55rem + var(--app-safe-right)) calc(0.55rem + var(--app-safe-bottom)) calc(0.55rem + var(--app-safe-left));
        z-index: 1320;
        display: none;
        overflow: hidden;
        border-radius: 0.9rem;
        box-shadow: 0 1.2rem 3rem rgba(15, 23, 42, 0.34) !important;
    }

    body.mobile-user-form-open .user-form-card {
        display: block;
    }

    .user-form-card .card-body {
        display: flex;
        max-height: 100%;
        flex-direction: column;
        overflow-y: auto;
        padding: 0.72rem;
    }

    .user-form-card__header {
        position: sticky;
        top: -0.72rem;
        z-index: 2;
        margin: -0.72rem -0.72rem 0.55rem;
        border-bottom: 1px solid #d9e7ef;
        background: #ffffff;
        padding: 0.62rem 0.72rem;
    }

    .user-form-card__header .card-title {
        margin: 0;
        font-size: 1rem;
    }

    .user-form-card .teacher-form > .row {
        grid-template-columns: 1fr;
        gap: 0.48rem;
    }

    .user-form-card .teacher-form > .row > [class*="user-form-"] {
        grid-column: 1 / -1;
    }

    .user-form-card .teacher-actions--form {
        position: sticky;
        bottom: -0.72rem;
        z-index: 2;
        align-items: stretch;
        justify-content: stretch;
        margin: 0.25rem -0.72rem -0.72rem !important;
        border-top: 1px solid #d9e7ef;
        background: #ffffff;
        padding: 0.58rem 0.72rem;
    }

    .user-form-card .teacher-actions--form .btn {
        width: 100%;
    }

    .admin-users-table-wrap {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        border: 1px solid #d5e0ea;
        border-radius: 0.68rem;
        background: #ffffff;
    }

    .admin-users-table {
        display: table;
        min-width: 920px;
        margin-bottom: 0;
        table-layout: fixed;
        white-space: normal;
    }

    .admin-users-table thead {
        display: table-header-group !important;
    }

    .admin-users-table tbody {
        display: table-row-group !important;
    }

    .admin-users-table tr {
        display: table-row !important;
        width: auto !important;
        margin: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    .admin-users-table th,
    .admin-users-table td {
        display: table-cell !important;
        width: auto;
        border: 1px solid #dce8ef !important;
        padding: 0.34rem 0.4rem !important;
        color: #1f3349;
        font-size: 0.7rem !important;
        line-height: 1.16;
        vertical-align: middle;
        overflow-wrap: anywhere;
    }

    .admin-users-table th {
        background: #e8f8fd !important;
        color: #0d526f;
        font-size: 0.62rem !important;
        font-weight: 900;
        text-transform: uppercase;
    }

    .admin-users-table td[data-label]::before {
        content: none !important;
    }

    .admin-users-table th:nth-child(1),
    .admin-users-table td:nth-child(1) {
        width: 10rem;
    }

    .admin-users-table th:nth-child(2),
    .admin-users-table td:nth-child(2) {
        width: 6rem;
    }

    .admin-users-table th:nth-child(3),
    .admin-users-table td:nth-child(3) {
        width: 10rem;
    }

    .admin-users-table th:nth-child(4),
    .admin-users-table td:nth-child(4) {
        width: 6rem;
    }

    .admin-users-table th:nth-child(5),
    .admin-users-table td:nth-child(5) {
        width: 7.2rem;
    }

    .admin-users-table th:nth-child(6),
    .admin-users-table td:nth-child(6) {
        width: 6.4rem;
    }

    .admin-users-table th:nth-child(7),
    .admin-users-table td:nth-child(7) {
        width: 4.6rem;
        text-align: center;
    }

    .admin-users-table th:nth-child(8),
    .admin-users-table td:nth-child(8) {
        width: 6.2rem;
    }

    .admin-users-table code {
        font-size: 0.68rem;
        white-space: nowrap;
    }

    .admin-users-table .action-icon-group {
        display: inline-flex !important;
        gap: 0.3rem !important;
        white-space: nowrap;
    }

    .admin-users-table .action-icon-group form {
        display: inline-flex !important;
        margin: 0;
    }

    .admin-users-table .btn-icon {
        width: 2rem !important;
        min-width: 2rem !important;
        height: 2rem !important;
        min-height: 2rem !important;
        border-radius: 0.45rem !important;
    }
}

/* Mobile reservation history as compact table */
@media (max-width: 768px) {
    #mis-reservas .mis-reservas-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid #d5e0ea;
        border-radius: 0.68rem;
        background: #ffffff;
    }

    #mis-reservas .mis-reservas-table {
        display: table;
        min-width: 650px;
        margin-bottom: 0;
        table-layout: fixed;
        white-space: normal;
    }

    #mis-reservas .mis-reservas-table thead {
        display: table-header-group;
    }

    #mis-reservas .mis-reservas-table tbody {
        display: table-row-group;
    }

    #mis-reservas .mis-reservas-table tr {
        display: table-row;
        width: auto;
        margin: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        overflow: visible;
    }

    #mis-reservas .mis-reservas-table th,
    #mis-reservas .mis-reservas-table td {
        display: table-cell;
        width: auto;
        border: 1px solid #dce8ef;
        padding: 0.36rem 0.42rem;
        color: #1f3349;
        font-size: 0.72rem;
        line-height: 1.18;
        vertical-align: middle;
        overflow-wrap: anywhere;
    }

    #mis-reservas .mis-reservas-table th {
        background: #e8f8fd;
        color: #0d526f;
        font-size: 0.64rem;
        font-weight: 900;
        text-transform: uppercase;
    }

    #mis-reservas .mis-reservas-table td[data-label]::before {
        content: none;
    }

    #mis-reservas .mis-reservas-table th:nth-child(1),
    #mis-reservas .mis-reservas-table td:nth-child(1) {
        width: 4.9rem;
    }

    #mis-reservas .mis-reservas-table th:nth-child(2),
    #mis-reservas .mis-reservas-table td:nth-child(2) {
        width: 5.6rem;
    }

    #mis-reservas .mis-reservas-table th:nth-child(3),
    #mis-reservas .mis-reservas-table td:nth-child(3) {
        width: 4rem;
        text-align: center;
    }

    #mis-reservas .mis-reservas-table th:nth-child(4),
    #mis-reservas .mis-reservas-table td:nth-child(4) {
        width: 5.4rem;
    }

    #mis-reservas .mis-reservas-table th:nth-child(5),
    #mis-reservas .mis-reservas-table td:nth-child(5) {
        width: 6.2rem;
    }

    #mis-reservas .mis-reservas-table th:nth-child(6),
    #mis-reservas .mis-reservas-table td:nth-child(6) {
        display: none;
    }

    #mis-reservas .mis-reservas-table th:nth-child(7),
    #mis-reservas .mis-reservas-table td:nth-child(7) {
        width: 6.4rem;
    }

    #mis-reservas .mis-reservas-table th:nth-child(8),
    #mis-reservas .mis-reservas-table td:nth-child(8) {
        width: 5.4rem;
    }

    #mis-reservas .mis-reservas-table small {
        display: block;
        margin-top: 0.12rem;
        font-size: 0.64rem;
        line-height: 1.12;
    }

    #mis-reservas .mis-reservas-table td .btn {
        width: auto;
        min-height: 1.9rem;
        margin: 0;
        border-radius: 0.48rem;
        padding: 0.25rem 0.38rem;
        font-size: 0.68rem;
        white-space: nowrap;
    }

    #mis-reservas .mis-reservas-table td form {
        display: inline-flex !important;
        margin: 0;
    }
}

/* Mobile admin users table and registration modal */
.mobile-user-form-toggle,
.user-form-card__close {
    display: none;
}

.user-form-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

@media (max-width: 768px) {
    .mobile-user-form-toggle {
        display: inline-flex;
    }

    body.mobile-user-form-open {
        overflow: hidden;
    }

    .user-form-card__close {
        display: grid;
        flex: 0 0 auto;
    }

    .user-form-card {
        position: fixed;
        inset: calc(0.55rem + var(--app-safe-top)) calc(0.55rem + var(--app-safe-right)) calc(0.55rem + var(--app-safe-bottom)) calc(0.55rem + var(--app-safe-left));
        z-index: 1320;
        display: none;
        overflow: hidden;
        border-radius: 0.9rem;
        box-shadow: 0 1.2rem 3rem rgba(15, 23, 42, 0.34) !important;
    }

    body.mobile-user-form-open .user-form-card {
        display: block;
    }

    body.mobile-user-form-open::after {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 1310;
        background: rgba(15, 23, 42, 0.48);
        backdrop-filter: blur(4px);
    }

    .user-form-card .card-body {
        display: flex;
        max-height: 100%;
        flex-direction: column;
        overflow-y: auto;
        padding: 0.72rem;
    }

    .user-form-card__header {
        position: sticky;
        top: -0.72rem;
        z-index: 2;
        margin: -0.72rem -0.72rem 0.55rem;
        border-bottom: 1px solid #d9e7ef;
        background: #ffffff;
        padding: 0.62rem 0.72rem;
    }

    .user-form-card__header .card-title {
        margin: 0;
        font-size: 1rem;
    }

    .user-form-card .teacher-form > .row {
        grid-template-columns: 1fr;
        gap: 0.48rem;
    }

    .user-form-card .teacher-form > .row > [class*="user-form-"] {
        grid-column: 1 / -1;
    }

    .user-form-card .teacher-actions--form {
        position: sticky;
        bottom: -0.72rem;
        z-index: 2;
        margin: 0.25rem -0.72rem -0.72rem !important;
        border-top: 1px solid #d9e7ef;
        background: #ffffff;
        padding: 0.58rem 0.72rem;
    }

    .admin-users-table-wrap {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        border: 1px solid #d5e0ea;
        border-radius: 0.68rem;
        background: #ffffff;
    }

    .admin-users-table {
        display: table;
        min-width: 920px;
        margin-bottom: 0;
        table-layout: fixed;
        white-space: normal;
    }

    .admin-users-table thead {
        display: table-header-group !important;
    }

    .admin-users-table tbody {
        display: table-row-group !important;
    }

    .admin-users-table tr {
        display: table-row !important;
        width: auto !important;
        margin: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    .admin-users-table th,
    .admin-users-table td {
        display: table-cell !important;
        width: auto;
        border: 1px solid #dce8ef !important;
        padding: 0.34rem 0.4rem !important;
        color: #1f3349;
        font-size: 0.7rem !important;
        line-height: 1.16;
        vertical-align: middle;
        overflow-wrap: anywhere;
    }

    .admin-users-table th {
        background: #e8f8fd !important;
        color: #0d526f;
        font-size: 0.62rem !important;
        font-weight: 900;
        text-transform: uppercase;
    }

    .admin-users-table td[data-label]::before {
        content: none !important;
    }

    .admin-users-table th:nth-child(1),
    .admin-users-table td:nth-child(1) {
        width: 10rem;
    }

    .admin-users-table th:nth-child(2),
    .admin-users-table td:nth-child(2) {
        width: 6rem;
    }

    .admin-users-table th:nth-child(3),
    .admin-users-table td:nth-child(3) {
        width: 10rem;
    }

    .admin-users-table th:nth-child(4),
    .admin-users-table td:nth-child(4) {
        width: 6rem;
    }

    .admin-users-table th:nth-child(5),
    .admin-users-table td:nth-child(5) {
        width: 7.2rem;
    }

    .admin-users-table th:nth-child(6),
    .admin-users-table td:nth-child(6) {
        width: 6.4rem;
    }

    .admin-users-table th:nth-child(7),
    .admin-users-table td:nth-child(7) {
        width: 4.6rem;
        text-align: center;
    }

    .admin-users-table th:nth-child(8),
    .admin-users-table td:nth-child(8) {
        width: 6.2rem;
    }

    .admin-users-table code {
        font-size: 0.68rem;
        white-space: nowrap;
    }

    .admin-users-table .action-icon-group {
        display: inline-flex !important;
        gap: 0.3rem !important;
        white-space: nowrap;
    }

    .admin-users-table .action-icon-group form {
        display: inline-flex !important;
        margin: 0;
    }

    .admin-users-table .btn-icon {
        width: 2rem !important;
        min-width: 2rem !important;
        height: 2rem !important;
        min-height: 2rem !important;
        border-radius: 0.45rem !important;
    }
}
.teacher-status-field {
    max-width: 18rem;
}
.user-form-card {
    border: 1px solid #d7e7ef;
    border-radius: 0.75rem;
}
.user-form-card .card-body {
    padding: 0.85rem 1rem 0.9rem;
}
.user-form-card .card-title {
    margin-bottom: 0.55rem;
    color: #0f7198 !important;
    font-size: 1.05rem;
    font-weight: 800;
}
.user-form-card .teacher-form > .row {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.52rem 0.75rem;
    align-items: start;
    margin: 0;
}
.user-form-card .teacher-form > .row > [class*="col-"] {
    width: auto;
    max-width: none;
    padding: 0;
}
.user-form-card .user-form-name {
    grid-column: span 4;
}
.user-form-card .user-form-rut {
    grid-column: span 2;
}
.user-form-card .user-form-subjects {
    grid-column: span 3;
}
.user-form-card .user-form-username {
    grid-column: span 3;
}
.user-form-card .user-form-role {
    grid-column: span 2;
}
.user-form-card .user-form-password {
    grid-column: span 3;
}
.user-form-card .user-form-status {
    grid-column: span 2;
}
.user-form-card .user-form-submit {
    grid-column: 9 / -1;
    align-self: end;
    justify-content: flex-end;
    margin-top: 0 !important;
}
.user-form-card .teacher-form .form-label {
    margin-bottom: 0.22rem;
    color: #102f52;
    font-size: 0.88rem;
    font-weight: 700;
}
.user-form-card .teacher-form .form-control,
.user-form-card .teacher-form .form-select,
.user-form-card .teacher-form .btn {
    min-height: 2.35rem;
    font-size: 0.92rem;
}
.user-form-card .teacher-form .input-group {
    max-width: none;
}
.user-form-card .teacher-form .form-text {
    margin-top: 0.22rem;
    color: #526b7d;
    font-size: 0.72rem;
    line-height: 1.35;
}
.user-form-card .teacher-form #selectedSubjectsList {
    min-height: 1.15rem;
    gap: 0.35rem !important;
    margin-top: 0.35rem !important;
}
.user-form-card .teacher-form #selectedSubjectsList .badge {
    padding: 0.32rem 0.48rem;
    border-radius: 0.35rem;
    font-size: 0.72rem;
}
.user-form-card .teacher-actions--form {
    margin-top: 0 !important;
}
.user-form-card .teacher-actions--form .btn {
    min-height: 2.35rem;
    padding-right: 1.1rem !important;
    padding-left: 1.1rem !important;
}
@media (max-width: 1200px) {
    .user-form-card .user-form-name {
        grid-column: span 5;
    }
    .user-form-card .user-form-rut {
        grid-column: span 3;
    }
    .user-form-card .user-form-subjects {
        grid-column: span 4;
    }
    .user-form-card .user-form-username,
    .user-form-card .user-form-password {
        grid-column: span 4;
    }
    .user-form-card .user-form-role,
    .user-form-card .user-form-status {
        grid-column: span 3;
    }
    .user-form-card .user-form-submit {
        grid-column: 8 / -1;
    }
}
@media (max-width: 768px) {
    .user-form-card .teacher-form > .row {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }
    .user-form-card .teacher-form > .row > [class*="user-form-"] {
        grid-column: 1 / -1;
    }
    .user-form-card .teacher-actions--form {
        align-items: stretch;
        justify-content: stretch;
    }
    .user-form-card .teacher-actions--form .btn {
        width: 100%;
    }
}
.table code {
    white-space: nowrap;
}
.toast-custom {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1080;
}
input,
select,
textarea,
.form-control,
.form-select {
    font-size: 1rem;
}
.admin-autocomplete {
    position: relative;
    z-index: 1;
}
.admin-autocomplete:focus-within {
    z-index: 1300;
}
#adminReservationCreateForm {
    position: relative;
}
#adminReservationCreateForm > [class*="col-"] {
    position: relative;
}
#adminReservationCreateForm > .admin-autocomplete-field-active,
#adminReservationCreateForm > [class*="col-"]:focus-within {
    z-index: 1500;
}
.admin-autocomplete-list {
    position: absolute;
    z-index: 1500;
    top: calc(100% + 0.25rem);
    right: 0;
    left: 0;
    display: none;
    max-height: 15rem;
    overflow-y: auto;
    border: 1px solid #b9d9e7;
    border-radius: 0.45rem;
    background: #ffffff !important;
    opacity: 1;
    box-shadow: 0 0.85rem 1.8rem rgba(31, 51, 73, 0.22);
}
.admin-autocomplete-list.is-floating {
    position: fixed;
    right: auto;
    left: auto;
    z-index: 3000;
}
.admin-autocomplete-list.is-open {
    display: block;
}
.admin-autocomplete-option {
    display: block;
    width: 100%;
    border: 0;
    border-bottom: 1px solid #edf4f8;
    background: #ffffff !important;
    color: #1f3349;
    padding: 0.62rem 0.75rem;
    text-align: left;
    line-height: 1.25;
    white-space: normal;
}
.admin-autocomplete-option:last-child {
    border-bottom: 0;
}
.admin-autocomplete-option:hover,
.admin-autocomplete-option:focus {
    background: #e8f8fd;
    color: #0d526f;
    outline: 0;
}
.admin-autocomplete-empty {
    padding: 0.55rem 0.7rem;
    color: #607487;
}
.admin-reservation-weekdays {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.55rem;
    max-width: 46rem;
}
.admin-reservation-weekday {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.6rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid #c7dae4;
    border-radius: 0.65rem;
    background: #ffffff;
    color: #12324c;
    box-shadow: 0 0.25rem 0.7rem rgba(31, 51, 73, 0.06);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.admin-reservation-weekday input {
    flex: 0 0 auto;
    width: 1.08rem;
    height: 1.08rem;
    accent-color: #1685b1;
}
.admin-reservation-weekday:hover {
    border-color: #81cfe6;
    background: #f3fbfe;
}
.admin-reservation-weekday:has(input:checked) {
    border-color: #1685b1;
    background: #e8f8fd;
    color: #0d526f;
    box-shadow: 0 0.35rem 0.85rem rgba(22, 133, 177, 0.16);
}
.admin-reservation-actions {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    white-space: nowrap;
}
.admin-reservation-actions form {
    display: inline-flex;
    margin: 0;
}
.admin-reservation-icon-btn,
.admin-reservation-history {
    display: inline-grid;
    width: 2.15rem;
    height: 2.15rem;
    place-items: center;
    padding: 0;
    border-radius: 0.45rem;
}
.admin-reservation-icon-btn i,
.admin-reservation-history i {
    margin: 0;
    font-size: 1rem;
}
.admin-reservation-history {
    border: 1px solid #d6e0e8;
    color: #607487;
    background: #f6f9fb;
}
.admin-reservations-pagination .btn {
    min-width: 7.5rem;
    font-weight: 700;
}
.admin-reservations-pagination .btn i {
    margin: 0 0.25rem;
}
.admin-reservation-edit-form .modal-header {
    background: #f8fbfd;
}
.admin-reservation-edit-form {
    overflow: hidden;
    border: 0;
    border-radius: 0.9rem;
    box-shadow: 0 1.25rem 3rem rgba(15, 23, 42, 0.28);
}
.admin-reservation-edit-form .modal-body {
    padding: 1.1rem 1.25rem;
}
.admin-reservation-edit-form .form-label {
    color: #12324c;
    font-weight: 800;
}
@media (min-width: 992px) {
    #editReservationModal .modal-dialog {
        max-width: 760px;
    }
}
@media (max-width: 768px) {
    #editReservationModal .modal-dialog {
        margin: 0.75rem;
    }
}
@media (max-width: 1199px) {
    .table-schedule td {
        min-width: 140px;
    }
    .weekly-calendar-modal .modal-dialog {
        max-width: calc(100vw - 1.25rem);
        margin: 0.6rem auto;
    }
    .weekly-calendar-modal .modal-header {
        padding: 0.8rem 1rem;
    }
    .weekly-calendar-modal .modal-body {
        padding: 0.7rem 0.8rem;
    }
    .weekly-calendar-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
    .weekly-calendar-toolbar__select {
        flex-basis: auto;
    }
    .weekly-calendar-toolbar__actions {
        display: grid;
        grid-template-columns: 2.65rem 1fr 2.65rem;
    }
    .weekly-calendar-table {
        min-width: 720px;
    }
    .weekly-calendar-table th,
    .weekly-calendar-table td {
        height: 44px;
        padding: 0.35rem 0.4rem;
        font-size: 0.86rem;
    }
    .weekly-calendar-col-index,
    .weekly-calendar-index {
        width: 2.1rem;
        min-width: 2.1rem;
        max-width: 2.1rem;
    }
    .weekly-calendar-col-time,
    .weekly-calendar-time,
    .weekly-calendar-time-heading {
        width: 5.8rem;
        min-width: 5.8rem;
        max-width: 5.8rem;
    }
}
@media (max-width: 768px) {
    .login-shell {
        padding: 0.85rem;
    }
    .login-background {
        opacity: 0.5;
    }
    .login-card .card-body {
        padding: 1.25rem !important;
    }
    .login-logo {
        width: 86px;
        height: 86px;
        margin-bottom: 0.75rem !important;
    }
    .login-card h1 {
        font-size: 1.15rem;
    }
    .login-card .form-label {
        margin-bottom: 0.35rem;
    }
    .login-card .mb-3,
    .login-card .mb-4 {
        margin-bottom: 0.9rem !important;
    }
    .login-card .btn,
    .login-card .form-control,
    .login-card .input-group-text {
        min-height: 42px;
    }
    .container {
        max-width: 100%;
        padding-right: 0.85rem;
        padding-left: 0.85rem;
    }
    .app-navbar > .container-fluid {
        padding-right: 0.85rem;
        padding-left: 0.85rem;
    }
    .app-navbar .navbar-brand {
        flex: 1 1 auto;
        max-width: calc(100% - 4.1rem);
        min-width: 0;
    }
    .app-navbar .navbar-toggler {
        flex: 0 0 auto;
        margin-left: 0.45rem;
    }
    .app-page {
        width: calc(100% - 1.7rem);
        margin-right: 0.85rem;
        margin-left: 0.85rem;
        padding-top: 6rem;
    }
    .container-fluid {
        padding-right: 0.65rem;
        padding-left: 0.65rem;
    }
    .navbar {
        margin-bottom: 0.85rem !important;
    }
    .navbar-collapse {
        padding-top: 0.75rem;
    }
    .app-navbar .nav-link {
        margin: 0.2rem 0;
        padding: 0.75rem 0.85rem;
        background: rgba(255, 255, 255, 0.08);
    }
    .app-brand-logo {
        width: 36px;
        height: 36px;
    }
    .app-brand span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.95rem;
    }
    .card {
        border-radius: 1rem;
    }
    .admin-dashboard-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.45rem;
    }
    .admin-dashboard-stat-card {
        border-radius: 0.7rem;
    }
    .admin-dashboard-stat-card .card-body {
        padding: 0.55rem 0.35rem;
        text-align: center;
    }
    .admin-dashboard-stat-card .card-title {
        margin-bottom: 0.25rem;
        font-size: 0.68rem;
        line-height: 1.05;
    }
    .admin-dashboard-stat-card .display-6 {
        margin-bottom: 0.15rem;
        font-size: 0.9rem;
        line-height: 1;
        overflow-wrap: anywhere;
    }
    .admin-dashboard-stat-card .text-muted {
        display: none;
    }
    .card-body {
        padding: 1rem;
    }
    .card-body > .d-flex.justify-content-between {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.85rem;
    }
    .card-body > .d-flex.justify-content-between .btn,
    .card-body > .d-flex.justify-content-between button {
        width: 100%;
    }
    h3,
    h4 {
        font-size: 1.2rem;
    }
    .alert {
        border-radius: 0.85rem;
        padding: 0.8rem;
    }
    .schedule-card-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    .schedule-card {
        min-height: auto;
        border-radius: 1rem;
        padding: 0.95rem;
    }
    .schedule-card-header {
        align-items: center;
    }
    .schedule-card-date {
        margin: 0.75rem 0;
    }
    .reserve-slot,
    #reservation-form .btn {
        width: 100%;
        min-height: 44px;
    }
    .reservation-form-modal .modal-body {
        grid-template-columns: 1fr;
        padding: 0.9rem;
    }
    .reservation-form-modal__footer,
    #reservation-form .d-flex {
        flex-direction: column;
        gap: 0.75rem;
    }
    .teacher-actions,
    .change-password-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .teacher-actions .btn,
    .change-password-actions .btn {
        width: 100%;
        min-height: 44px;
    }
    .table-responsive {
        overflow: visible;
    }
    .table-responsive table:not(.table-schedule):not(.admin-reservations-table) {
        border: 0;
    }
    .table-responsive table:not(.table-schedule):not(.admin-reservations-table) thead {
        display: none;
    }
    .table-responsive table:not(.table-schedule):not(.admin-reservations-table) tbody,
    .table-responsive table:not(.table-schedule):not(.admin-reservations-table) tr,
    .table-responsive table:not(.table-schedule):not(.admin-reservations-table) td {
        display: block;
        width: 100%;
    }
    .table-responsive table:not(.table-schedule):not(.admin-reservations-table) tr {
        margin-bottom: 0.85rem;
        border: 1px solid #cfe4ef;
        border-radius: 1rem;
        background: #ffffff;
        box-shadow: 0 0.25rem 0.9rem rgba(31, 51, 73, 0.08);
        overflow: hidden;
    }
    .table-responsive table:not(.table-schedule):not(.admin-reservations-table) td {
        border: 0;
        border-bottom: 1px solid #edf3f7;
        padding: 0.7rem 0.85rem;
    }
    .table-responsive table:not(.table-schedule):not(.admin-reservations-table) td[data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.2rem;
        color: #607487;
        font-size: 0.78rem;
        font-weight: 700;
        text-transform: uppercase;
    }
    .table-responsive table:not(.table-schedule):not(.admin-reservations-table) td:last-child {
        border-bottom: 0;
    }
    .table-responsive table:not(.table-schedule):not(.admin-reservations-table) td .btn {
        width: 100%;
        margin: 0.25rem 0;
        min-height: 42px;
    }
    .table-responsive table:not(.table-schedule):not(.admin-reservations-table) td form {
        display: block !important;
    }
    .admin-reservations-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .admin-reservations-table {
        min-width: 980px;
        white-space: nowrap;
    }
    .admin-reservation-weekdays {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .admin-reservation-weekday {
        width: 100%;
    }
    .table-schedule td,
    .table-schedule th {
        font-size: 0.82rem;
        padding: 0.45rem;
    }
    .weekly-calendar-table {
        min-width: 680px;
    }
    .weekly-calendar-table th,
    .weekly-calendar-table td {
        height: 42px;
        font-size: 0.78rem;
    }
    .weekly-calendar-toolbar__actions {
        display: grid;
        grid-template-columns: repeat(3, 2.65rem);
        justify-content: start;
    }
    .weekly-calendar-toolbar__actions .btn,
    .weekly-calendar-toolbar__actions .btn:not(.btn-success) {
        width: 2.65rem;
        min-width: 2.65rem;
        padding-right: 0;
        padding-left: 0;
        font-size: 0;
    }
    .weekly-calendar-toolbar__actions .btn i {
        margin: 0;
        font-size: 1rem;
    }
    .weekly-calendar-modal .modal-footer {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 0.45rem;
    }
    .weekly-calendar-modal .modal-footer .btn {
        width: 2.65rem;
        min-width: 2.65rem;
        padding-right: 0;
        padding-left: 0;
        font-size: 0;
    }
    .weekly-calendar-modal .modal-footer .btn i {
        margin: 0;
        font-size: 1rem;
    }
}
@media (max-width: 420px) {
    .login-card .card-body {
        padding: 1rem !important;
    }
    .login-logo {
        width: 74px;
        height: 74px;
    }
    .login-card h1 {
        font-size: 1.05rem;
    }
    .schedule-card-title {
        font-size: 1rem;
    }
    .badge {
        white-space: normal;
        text-align: center;
    }
}

.table-responsive table:not(.table-schedule) td .action-icon-group {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.table-responsive table:not(.table-schedule) td .action-icon-group .btn-icon {
    width: 2.15rem;
    min-width: 2.15rem;
    height: 2.15rem;
    min-height: 2.15rem;
    display: inline-grid;
    place-items: center;
    margin: 0;
    padding: 0;
}

.table-responsive table:not(.table-schedule) td .action-icon-group form {
    display: inline-flex !important;
    margin: 0;
}

@media (max-width: 768px) {
    .table-responsive table:not(.table-schedule) td .action-icon-group {
        gap: 0.55rem;
        padding-top: 0.15rem;
    }

    .table-responsive table:not(.table-schedule) td .action-icon-group .btn-icon {
        width: 2.75rem;
        min-width: 2.75rem;
        height: 2.75rem;
        min-height: 2.75rem;
        border-radius: 0.6rem;
    }
}

/* Login 2026 refresh */
.login-home-link {
    order: initial;
    background: rgba(255, 255, 255, 0.26);
}
.login-password-toggle i {
    margin-right: 0;
}
@media (max-width: 920px) {
    .login-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        padding: 1.3rem;
    }
    .login-brand-panel {
        align-items: flex-end;
    }
    .login-brand-content {
        max-width: 34rem;
    }
    .login-logo {
        width: 6.6rem;
        height: 6.6rem;
        margin-bottom: 0.9rem;
    }
    .login-brand-copy {
        margin-top: 0.85rem;
    }
    .login-benefits {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .login-benefit:nth-child(even) {
        border-right: 0;
    }
}
@media (max-width: 768px) {
    .login-background {
        opacity: 1;
    }
    .login-shell {
        padding: 1rem;
    }
    .login-brand-panel {
        display: none;
    }
    .login-access-panel {
        align-items: center;
    }
    .login-card {
        width: min(100%, 28rem);
        padding: 1.15rem;
        border-radius: 1rem;
    }
    .login-user-icon {
        width: 4.6rem;
        height: 4.6rem;
        font-size: 1.9rem;
    }
    .login-card-heading h2 {
        font-size: 1.55rem;
    }
    .login-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.55rem;
    }
    .login-muted-link {
        text-align: left;
    }
    .login-benefits {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }
    .login-benefit {
        min-height: auto;
        border-top: 1px solid rgba(255, 255, 255, 0.22);
        border-right: 0;
    }
    .login-footer-text {
        font-size: 0.8rem;
    }
}
@media (max-width: 420px) {
    .login-card {
        padding: 1rem;
    }
    .login-input-wrap {
        grid-template-columns: 2.25rem 1fr auto;
    }
    .login-benefits {
        display: none;
    }
}

/* Login compact desktop/notebook scale */
.login-shell {
    gap: clamp(0.75rem, 2vw, 1.8rem);
    padding: clamp(0.75rem, 2vh, 1.6rem) clamp(1.5rem, 5vw, 4rem) 0.75rem;
}
.login-logo {
    width: clamp(5.4rem, 7vw, 7.4rem);
    height: clamp(5.4rem, 7vw, 7.4rem);
    margin-bottom: 0.95rem;
}
.login-brand-content h1 {
    font-size: clamp(1.85rem, 3vw, 2.55rem);
    line-height: 1.14;
}
.login-brand-copy {
    max-width: 20rem;
    margin-top: 0.95rem;
    font-size: 0.95rem;
    line-height: 1.55;
}
.login-card {
    width: min(100%, 27rem);
    padding: clamp(1rem, 1.8vw, 1.55rem);
    border-radius: 1.05rem;
}
.login-user-icon {
    width: 4.15rem;
    height: 4.15rem;
    margin-bottom: 0.9rem;
    box-shadow: 0 0 0 0.35rem rgba(64, 215, 255, 0.14), 0 0.55rem 1.4rem rgba(0, 104, 180, 0.18);
    font-size: 1.75rem;
}
.login-card-heading {
    margin-bottom: 1rem;
}
.login-card-heading h2 {
    margin-bottom: 0.35rem;
    font-size: 1.55rem;
}
.login-card-heading p {
    font-size: 0.9rem;
}
.login-form {
    gap: 0.72rem;
}
.login-field .form-label {
    margin-bottom: 0.25rem;
    font-size: 0.92rem;
}
.login-input-wrap {
    min-height: 3rem;
}
.login-input-wrap .form-control {
    min-height: 2.95rem;
}
.login-password-toggle {
    height: 2.95rem;
}
.login-options {
    font-size: 0.88rem;
}
.login-submit {
    min-height: 3.05rem;
    font-size: 1rem;
}
.login-home-link {
    min-height: 2.95rem;
}
.login-divider {
    gap: 0.65rem;
    font-size: 0.9rem;
}
.login-benefits {
    gap: 0.65rem;
}
.login-benefit {
    min-height: 3.25rem;
    gap: 0.75rem;
    padding: 0.35rem 0.75rem;
}
.login-benefit > i {
    width: 2.35rem;
    height: 2.35rem;
    font-size: 1.25rem;
}
.login-benefit strong {
    font-size: 0.9rem;
}
.login-benefit span {
    margin-top: 0.12rem;
    font-size: 0.8rem;
}
.login-footer-text {
    margin-top: 0;
    font-size: 0.82rem;
}
@media (max-height: 760px) and (min-width: 769px) {
    .login-shell {
        grid-template-rows: 1fr auto;
        padding-top: 0.65rem;
        padding-bottom: 0.55rem;
    }
    .login-brand-copy {
        display: none;
    }
    .login-benefits {
        display: none;
    }
    .login-footer-text {
        grid-column: 1 / -1;
        margin-top: -0.25rem;
    }
}

/* Login reference-fit refinement: keep all reference content visible on notebooks. */
.login-page {
    overflow: hidden;
}
.login-shell {
    align-items: center;
    grid-template-columns: minmax(18rem, 0.78fr) minmax(20rem, 0.9fr);
    grid-template-rows: minmax(0, 1fr) auto auto;
    gap: clamp(0.45rem, 1.5vh, 0.9rem) clamp(1.5rem, 5vw, 4.5rem);
    padding: clamp(0.5rem, 2vh, 1.2rem) clamp(1.25rem, 5vw, 4.5rem) 0.55rem;
}
.login-brand-panel {
    justify-content: flex-start;
    padding-left: clamp(0rem, 2vw, 2rem);
}
.login-brand-content {
    max-width: 22rem;
}
.login-logo {
    width: clamp(5.8rem, 8vw, 8rem);
    height: clamp(5.8rem, 8vw, 8rem);
    margin-bottom: clamp(0.45rem, 1.2vh, 0.9rem);
}
.login-welcome {
    margin-bottom: clamp(0.35rem, 0.9vh, 0.65rem);
    font-size: clamp(0.9rem, 1.25vw, 1.05rem);
}
.login-brand-content h1 {
    font-size: clamp(1.55rem, 2.45vw, 2.25rem);
    line-height: 1.16;
}
.login-brand-copy {
    display: block;
    max-width: 20rem;
    margin-top: clamp(0.5rem, 1.3vh, 0.95rem);
    font-size: clamp(0.82rem, 1.08vw, 0.95rem);
    line-height: 1.46;
}
.login-card {
    width: clamp(21rem, 31.5vw, 27rem);
    padding: clamp(0.78rem, 2vh, 1.35rem) clamp(1rem, 2.5vw, 1.7rem);
    border-radius: 1.05rem;
}
.login-user-icon {
    width: clamp(3.15rem, 7.5vh, 5rem);
    height: clamp(3.15rem, 7.5vh, 5rem);
    margin-bottom: clamp(0.45rem, 1.2vh, 0.9rem);
    font-size: clamp(1.35rem, 3.2vh, 2rem);
}
.login-card-heading {
    margin-bottom: clamp(0.55rem, 1.5vh, 1.1rem);
}
.login-card-heading h2 {
    margin-bottom: 0.25rem;
    font-size: clamp(1.25rem, 2.1vw, 1.75rem);
}
.login-card-heading p {
    font-size: clamp(0.78rem, 1.2vw, 0.92rem);
}
.login-form {
    gap: clamp(0.45rem, 1.05vh, 0.78rem);
}
.login-field .form-label {
    margin-bottom: 0.22rem;
    font-size: clamp(0.82rem, 1.1vw, 0.92rem);
}
.login-input-wrap {
    min-height: clamp(2.4rem, 6.3vh, 3.35rem);
}
.login-input-wrap .form-control {
    min-height: clamp(2.35rem, 6.1vh, 3.25rem);
}
.login-password-toggle {
    height: clamp(2.35rem, 6.1vh, 3.25rem);
}
.login-options,
.login-divider {
    font-size: clamp(0.78rem, 1.05vw, 0.9rem);
}
.login-submit {
    min-height: clamp(2.45rem, 6.25vh, 3.35rem);
    font-size: clamp(0.9rem, 1.25vw, 1.02rem);
}
.login-home-link {
    min-height: clamp(2.35rem, 5.95vh, 3.15rem);
}
.login-benefits {
    display: grid;
    gap: clamp(0.35rem, 1vw, 0.75rem);
}
.login-benefit {
    min-height: clamp(2.15rem, 5.2vh, 3.2rem);
    gap: clamp(0.45rem, 1vw, 0.75rem);
    padding: 0.25rem clamp(0.45rem, 1.2vw, 0.8rem);
}
.login-benefit > i {
    width: clamp(1.85rem, 4.5vh, 2.55rem);
    height: clamp(1.85rem, 4.5vh, 2.55rem);
    font-size: clamp(1rem, 2.35vh, 1.3rem);
}
.login-benefit strong {
    font-size: clamp(0.75rem, 1vw, 0.9rem);
}
.login-benefit span {
    margin-top: 0.08rem;
    font-size: clamp(0.7rem, 0.9vw, 0.8rem);
}
.login-footer-text {
    margin-top: 0;
    font-size: clamp(0.72rem, 1vw, 0.84rem);
}
@media (max-height: 760px) and (min-width: 769px) {
    .login-shell {
        grid-template-rows: minmax(0, 1fr) auto auto;
    }
    .login-brand-copy {
        display: block;
    }
    .login-benefits {
        display: grid;
    }
    .login-footer-text {
        margin-top: 0;
    }
}
@media (max-width: 768px) {
    .login-page {
        overflow-y: auto;
    }
    .login-shell {
        min-height: 100dvh;
        padding: 0.85rem;
    }
    .login-card {
        width: min(100%, 24rem);
    }
    .login-benefits {
        display: none;
    }
}

/* Login mobile layout */
@media (max-width: 768px) {
    .login-page {
        overflow-x: hidden;
        overflow-y: auto;
        min-height: 100dvh;
    }
    .login-background {
        opacity: 1;
        background-position: center top;
    }
    .login-background::after {
        background:
            linear-gradient(180deg, rgba(3, 18, 58, 0.76), rgba(3, 18, 58, 0.92)),
            radial-gradient(circle at 15% 4%, transparent 0 7rem, rgba(255, 255, 255, 0.12) 7.05rem 7.12rem, transparent 7.2rem);
    }
    .login-shell {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 0.62rem;
        min-height: 100dvh;
        padding: max(0.75rem, env(safe-area-inset-top)) 0.75rem max(0.75rem, env(safe-area-inset-bottom));
    }
    .login-brand-panel {
        display: flex;
        justify-content: center;
        width: 100%;
        padding: 0;
    }
    .login-brand-content {
        max-width: 22rem;
        text-align: center;
    }
    .login-logo {
        width: clamp(4.1rem, 17vw, 5.1rem);
        height: clamp(4.1rem, 17vw, 5.1rem);
        margin: 0 auto 0.35rem;
    }
    .login-welcome {
        margin: 0 0 0.18rem;
        font-size: 0.82rem;
    }
    .login-brand-content h1 {
        font-size: clamp(1.25rem, 6.2vw, 1.65rem);
        line-height: 1.12;
    }
    .login-brand-copy {
        display: block;
        max-width: 19rem;
        margin: 0.32rem auto 0;
        font-size: 0.76rem;
        line-height: 1.32;
    }
    .login-access-panel {
        align-items: flex-start;
        width: 100%;
    }
    .login-card {
        width: min(100%, 22.5rem);
        margin: 0 auto;
        padding: 0.78rem;
        border-radius: 0.95rem;
    }
    .login-user-icon {
        width: 3rem;
        height: 3rem;
        margin-bottom: 0.45rem;
        font-size: 1.32rem;
        box-shadow: 0 0 0 0.24rem rgba(64, 215, 255, 0.14), 0 0.45rem 1rem rgba(0, 104, 180, 0.18);
    }
    .login-card-heading {
        margin-bottom: 0.52rem;
    }
    .login-card-heading h2 {
        margin-bottom: 0.14rem;
        font-size: 1.24rem;
    }
    .login-card-heading p {
        font-size: 0.78rem;
    }
    .login-alert {
        padding: 0.55rem 0.7rem;
        font-size: 0.82rem;
    }
    .login-form {
        gap: 0.46rem;
    }
    .login-field .form-label {
        margin-bottom: 0.18rem;
        font-size: 0.82rem;
    }
    .login-input-wrap {
        grid-template-columns: 2.3rem minmax(0, 1fr) auto;
        min-height: 2.52rem;
        border-radius: 0.62rem;
    }
    .login-input-wrap > i {
        font-size: 1rem;
    }
    .login-input-wrap .form-control {
        min-height: 2.48rem;
        padding-right: 0.45rem;
        font-size: 0.92rem;
    }
    .login-password-toggle {
        width: 2.7rem;
        height: 2.48rem;
        font-size: 1rem;
    }
    .login-options {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.45rem;
        font-size: 0.76rem;
    }
    .login-remember {
        gap: 0.38rem;
        white-space: nowrap;
    }
    .login-remember input {
        width: 1rem;
        height: 1rem;
    }
    .login-muted-link {
        max-width: 10rem;
        text-align: right;
    }
    .login-submit {
        min-height: 2.62rem;
        border-radius: 0.62rem;
        font-size: 0.92rem;
    }
    .login-divider {
        gap: 0.45rem;
        font-size: 0.78rem;
    }
    .login-home-link {
        min-height: 2.5rem;
        border-radius: 0.62rem;
        font-size: 0.9rem;
    }
    .login-benefits {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: min(100%, 22.5rem);
        margin: 0.1rem auto 0;
        gap: 0.35rem;
    }
    .login-benefit {
        min-height: auto;
        padding: 0.38rem;
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 0.65rem;
        background: rgba(6, 29, 74, 0.25);
    }
    .login-benefit > i {
        width: 1.8rem;
        height: 1.8rem;
        font-size: 1rem;
    }
    .login-benefit strong {
        font-size: 0.72rem;
    }
    .login-benefit span {
        font-size: 0.66rem;
    }
    .login-footer-text {
        width: min(100%, 22.5rem);
        margin: 0 auto;
        font-size: 0.68rem;
        line-height: 1.25;
    }
}
@media (max-width: 380px) {
    .login-shell {
        padding-right: 0.55rem;
        padding-left: 0.55rem;
    }
    .login-brand-copy {
        display: none;
    }
    .login-card {
        padding: 0.68rem;
    }
    .login-options {
        align-items: flex-start;
        flex-direction: column;
    }
    .login-muted-link {
        max-width: none;
        text-align: left;
    }
}

/* Login brand panel scale adjustment */
@media (min-width: 769px) {
    .login-brand-content {
        max-width: clamp(24rem, 33vw, 34rem);
    }
    .login-logo {
        width: clamp(7.2rem, 9.5vw, 10rem);
        height: clamp(7.2rem, 9.5vw, 10rem);
        margin-bottom: clamp(0.75rem, 1.7vh, 1.25rem);
    }
    .login-welcome {
        font-size: clamp(1rem, 1.25vw, 1.18rem);
    }
    .login-brand-content h1 {
        font-size: clamp(2rem, 3.15vw, 3.15rem);
        line-height: 1.14;
    }
    .login-brand-copy {
        max-width: clamp(22rem, 28vw, 29rem);
        font-size: clamp(0.95rem, 1.18vw, 1.08rem);
        line-height: 1.55;
    }
}
@media (max-height: 760px) and (min-width: 769px) {
    .login-logo {
        width: clamp(6.2rem, 8vh, 7.4rem);
        height: clamp(6.2rem, 8vh, 7.4rem);
    }
    .login-brand-content h1 {
        font-size: clamp(1.85rem, 2.75vw, 2.7rem);
    }
    .login-brand-copy {
        font-size: clamp(0.86rem, 1vw, 0.96rem);
        line-height: 1.42;
    }
}

/* PWA mobile app layer */
:root {
    --app-safe-top: env(safe-area-inset-top, 0px);
    --app-safe-right: env(safe-area-inset-right, 0px);
    --app-safe-bottom: env(safe-area-inset-bottom, 0px);
    --app-safe-left: env(safe-area-inset-left, 0px);
}

html {
    min-height: 100%;
    background: #f4f8fb;
}

body {
    min-height: 100dvh;
    -webkit-tap-highlight-color: rgba(22, 133, 177, 0.16);
}

.app-navbar .pwa-install-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font: inherit;
    font-weight: 800;
}

.app-navbar .pwa-install-menu-button i {
    margin: 0;
}

.app-navbar .pwa-install-menu-button:hover,
.app-navbar .pwa-install-menu-button:focus {
    background: rgba(255, 255, 255, 0.24);
    color: #ffffff;
}

.pwa-install-login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 2.95rem;
    border: 1px solid rgba(55, 216, 255, 0.58);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.72);
    color: #123c55;
    font-weight: 900;
}

.pwa-install-login-button i {
    margin: 0;
}

.pwa-ios-hint {
    position: fixed;
    right: calc(0.85rem + var(--app-safe-right));
    bottom: calc(4.35rem + var(--app-safe-bottom));
    left: calc(0.85rem + var(--app-safe-left));
    z-index: 1260;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.pwa-ios-hint__card {
    position: relative;
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 0.75rem;
    width: min(100%, 25rem);
    border: 1px solid rgba(213, 224, 234, 0.92);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1rem 2.4rem rgba(15, 23, 42, 0.24);
    color: #12324c;
    padding: 0.9rem 2.55rem 0.9rem 0.95rem;
    pointer-events: auto;
    backdrop-filter: blur(16px) saturate(145%);
}

.pwa-ios-hint__card > i {
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    place-items: center;
    border-radius: 50%;
    background: #e8f8fd;
    color: #126f96;
    font-size: 1.25rem;
}

.pwa-ios-hint__card strong,
.pwa-ios-hint__card p {
    display: block;
}

.pwa-ios-hint__card strong {
    margin-bottom: 0.15rem;
    font-weight: 900;
}

.pwa-ios-hint__card p {
    margin: 0;
    color: #526b7d;
    font-size: 0.9rem;
    line-height: 1.35;
}

.pwa-ios-hint__close {
    position: absolute;
    top: 0.5rem;
    right: 0.55rem;
    display: grid;
    width: 1.85rem;
    height: 1.85rem;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #eef5fb;
    color: #41566b;
    font-size: 1.25rem;
    line-height: 1;
}

.offline-page {
    display: grid;
    min-height: 100dvh;
    place-items: center;
    background: linear-gradient(180deg, #f4f8fb 0%, #e8eef6 100%);
    padding: calc(1rem + var(--app-safe-top)) calc(1rem + var(--app-safe-right)) calc(1rem + var(--app-safe-bottom)) calc(1rem + var(--app-safe-left));
}

.offline-shell {
    width: min(100%, 24rem);
    border: 1px solid #d7e7ef;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 1rem 2.2rem rgba(31, 51, 73, 0.12);
    padding: 1.35rem;
    text-align: center;
}

.offline-shell img {
    width: 5rem;
    height: 5rem;
    object-fit: contain;
    margin-bottom: 0.85rem;
}

.offline-shell h1 {
    margin-bottom: 0.55rem;
    color: #123c55;
    font-size: 1.35rem;
    font-weight: 900;
}

.offline-shell p {
    margin-bottom: 1rem;
    color: #526b7d;
    line-height: 1.5;
}

@media (display-mode: standalone) {
    body:not(.login-page):not(.offline-page) {
        padding-top: var(--app-safe-top);
        padding-bottom: var(--app-safe-bottom);
        background: #f4f8fb;
    }

    .app-navbar {
        padding-top: var(--app-safe-top);
    }
}

@media (max-width: 768px) {
    body:not(.login-page):not(.offline-page) {
        background:
            linear-gradient(180deg, rgba(232, 248, 253, 0.86) 0, rgba(244, 248, 251, 0) 13rem),
            #f4f8fb;
        overscroll-behavior-y: contain;
    }

    .app-navbar {
        border-bottom: 1px solid rgba(255, 255, 255, 0.36);
        box-shadow: 0 0.6rem 1.4rem rgba(15, 23, 42, 0.14) !important;
    }

    .app-navbar > .container-fluid {
        position: relative;
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        min-height: 4rem;
        padding-right: calc(0.85rem + var(--app-safe-right));
        padding-left: calc(0.85rem + var(--app-safe-left));
    }

    .app-navbar .navbar-brand {
        display: inline-flex;
        flex: 1 1 auto;
        align-items: center;
        max-width: calc(100% - 3.25rem);
        min-width: 0;
        margin-right: 0;
    }

    .app-navbar .navbar-toggler {
        flex: 0 0 auto;
        margin-left: 0.55rem;
        width: 2.75rem;
        height: 2.75rem;
        border-color: rgba(255, 255, 255, 0.44);
        border-radius: 0.85rem;
        background: rgba(255, 255, 255, 0.14);
        padding: 0;
    }

    .app-navbar .navbar-collapse {
        position: absolute;
        top: calc(100% + 0.45rem);
        right: calc(0.85rem + var(--app-safe-right));
        left: calc(0.85rem + var(--app-safe-left));
        z-index: 1120;
        max-height: calc(100dvh - 5rem - var(--app-safe-top));
        overflow-y: auto;
        border: 1px solid rgba(255, 255, 255, 0.28);
        border-radius: 1rem;
        background: rgba(18, 91, 126, 0.98);
        box-shadow: 0 0.9rem 2rem rgba(15, 23, 42, 0.22);
        padding: 0.55rem;
        backdrop-filter: blur(14px) saturate(145%);
    }

    .app-navbar .nav-link {
        min-height: 2.8rem;
        border-radius: 0.85rem;
        font-size: 1rem;
    }

    .app-navbar .nav-link i {
        width: 1.35rem;
        margin-right: 0.45rem;
        text-align: center;
    }

    .app-navbar .pwa-install-nav-item {
        order: -1;
    }

    .app-navbar .pwa-install-menu-button {
        width: 100%;
        min-height: 2.85rem;
        border-color: rgba(255, 255, 255, 0.62);
        background: #ffffff;
        color: #126f96;
    }

    .app-navbar .pwa-install-menu-button:hover,
    .app-navbar .pwa-install-menu-button:focus {
        background: #e8f8fd;
        color: #0d526f;
    }

    .app-page {
        width: auto;
        margin-right: 0;
        margin-left: 0;
        padding: calc(5.15rem + var(--app-safe-top)) calc(0.85rem + var(--app-safe-right)) calc(1.4rem + var(--app-safe-bottom)) calc(0.85rem + var(--app-safe-left));
    }

    .app-page > .row {
        --bs-gutter-y: 0.85rem;
    }

    .card {
        border: 1px solid rgba(215, 231, 239, 0.95) !important;
        border-radius: 1rem;
        box-shadow: 0 0.45rem 1.2rem rgba(31, 51, 73, 0.09) !important;
    }

    .card-body {
        padding: 0.95rem;
    }

    .btn,
    .form-control,
    .form-select {
        min-height: 2.85rem;
        border-radius: 0.85rem;
    }

    .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.35rem;
        white-space: normal;
    }

    .btn i {
        margin-right: 0;
    }

    .schedule-card-grid {
        margin-bottom: calc(1rem + var(--app-safe-bottom));
    }

    .schedule-card {
        border-width: 1px;
        border-left-width: 0.35rem;
        box-shadow: 0 0.45rem 1.2rem rgba(31, 51, 73, 0.09);
    }

    .schedule-card-hour {
        grid-template-columns: 1fr;
        gap: 0.25rem;
        border-radius: 0.8rem;
    }

    .schedule-card-hour__status {
        text-align: left;
    }

    .reservation-window-card {
        align-items: flex-start;
        border-radius: 1rem;
    }

    .reservation-window-card__chips span {
        min-height: 2rem;
        border-radius: 999px;
    }

    .modal-dialog {
        margin-right: calc(0.85rem + var(--app-safe-right));
        margin-left: calc(0.85rem + var(--app-safe-left));
    }

    .reservation-form-modal .modal-content,
    .weekly-calendar-modal .modal-content,
    .admin-reservation-edit-form {
        border-radius: 1rem;
    }

    .reservation-form-modal__footer .btn {
        min-height: 2.9rem;
    }
}

@media (max-width: 420px) {
    .app-brand span {
        font-size: 0.9rem;
    }

    .card-body {
        padding: 0.85rem;
    }
}

/* Compact mobile density */
@media (max-width: 768px) {
    body {
        font-size: 0.92rem;
    }

    .app-navbar > .container-fluid {
        min-height: 3.35rem;
    }

    .app-brand {
        gap: 0.45rem;
    }

    .app-brand-logo {
        width: 32px;
        height: 32px;
        padding: 0.16rem;
    }

    .app-brand span {
        font-size: 0.86rem;
    }

    .app-navbar .navbar-toggler {
        width: 2.35rem;
        height: 2.35rem;
        border-radius: 0.65rem;
    }

    .app-navbar .navbar-toggler-icon {
        width: 1.25rem;
        height: 1.25rem;
    }

    .app-navbar .navbar-collapse {
        top: calc(100% + 0.35rem);
        border-radius: 0.8rem;
        padding: 0.42rem;
    }

    .app-navbar .nav-link {
        min-height: 2.35rem;
        margin: 0.12rem 0;
        border-radius: 0.65rem;
        padding: 0.48rem 0.62rem;
        font-size: 0.9rem;
    }

    .app-navbar .pwa-install-menu-button {
        min-height: 2.35rem;
    }

    .app-page {
        padding: calc(4.25rem + var(--app-safe-top)) calc(0.55rem + var(--app-safe-right)) calc(0.85rem + var(--app-safe-bottom)) calc(0.55rem + var(--app-safe-left));
    }

    .app-page > .row,
    .row.g-4,
    .row.gy-4,
    .row.gy-3,
    .row.g-3 {
        --bs-gutter-x: 0.55rem;
        --bs-gutter-y: 0.55rem;
    }

    .card {
        border-radius: 0.75rem;
        box-shadow: 0 0.28rem 0.85rem rgba(31, 51, 73, 0.08) !important;
    }

    .card-body {
        padding: 0.68rem;
    }

    .card-title {
        margin-bottom: 0.38rem;
        font-size: 1rem;
        line-height: 1.15;
    }

    h3,
    h4,
    h5 {
        line-height: 1.18;
    }

    h3 {
        font-size: 1.1rem;
    }

    h4,
    h5 {
        font-size: 1rem;
    }

    p,
    .text-muted,
    .list-group-item,
    small {
        line-height: 1.32;
    }

    .btn,
    .form-control,
    .form-select {
        min-height: 2.35rem;
        border-radius: 0.65rem;
        font-size: 0.9rem;
    }

    .btn {
        padding: 0.42rem 0.65rem;
    }

    .alert {
        border-radius: 0.7rem;
        padding: 0.58rem 0.65rem;
        font-size: 0.9rem;
    }

    .admin-dashboard-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.38rem;
        margin-bottom: 0.58rem;
    }

    .admin-dashboard-stat-card {
        min-height: 4.65rem;
        border-radius: 0.68rem;
    }

    .admin-dashboard-stat-card .card-body {
        display: flex;
        min-height: 4.65rem;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 0.42rem 0.22rem;
        text-align: center;
    }

    .admin-dashboard-stat-card .card-title {
        display: -webkit-box;
        min-height: 1.65rem;
        margin-bottom: 0.16rem;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        color: #0d6f96 !important;
        font-size: 0.62rem;
        font-weight: 800;
        line-height: 1.12;
        overflow-wrap: anywhere;
    }

    .admin-dashboard-stat-card .display-6 {
        margin: 0;
        color: #111827;
        font-size: 0.86rem;
        font-weight: 900;
        line-height: 1.02;
        overflow-wrap: anywhere;
    }

    .admin-dashboard-stat-card .text-muted {
        display: none;
    }

    .card-body > .d-flex.justify-content-between {
        gap: 0.55rem;
        margin-bottom: 0.5rem !important;
    }

    .card-body > .d-flex.justify-content-between .btn,
    .card-body > .d-flex.justify-content-between button {
        min-height: 2.35rem;
    }

    .mt-4 {
        margin-top: 0.68rem !important;
    }

    .mt-3 {
        margin-top: 0.55rem !important;
    }

    .mb-3 {
        margin-bottom: 0.55rem !important;
    }

    .mb-2 {
        margin-bottom: 0.35rem !important;
    }

    .p-3 {
        padding: 0.65rem !important;
    }

    .rounded-3 {
        border-radius: 0.7rem !important;
    }

    .schedule-card-grid {
        gap: 0.55rem;
    }

    .schedule-card {
        border-radius: 0.72rem;
        padding: 0.62rem;
    }

    .schedule-card-title {
        font-size: 0.92rem;
    }

    .schedule-card-time,
    .schedule-card-date {
        font-size: 0.82rem;
    }

    .schedule-card-date {
        margin: 0.48rem 0;
    }

    .schedule-card-hours {
        gap: 0.32rem;
        margin-bottom: 0.55rem;
    }

    .schedule-card-hour {
        padding: 0.42rem 0.5rem;
        border-radius: 0.6rem;
    }

    .schedule-card-hour strong {
        font-size: 0.78rem;
    }

    .schedule-card-hour span {
        font-size: 0.75rem;
    }

    .badge {
        border-radius: 999px;
        padding: 0.28rem 0.42rem;
        font-size: 0.68rem;
        line-height: 1.05;
    }
}

@media (max-width: 380px) {
    .admin-dashboard-stats {
        gap: 0.3rem;
    }

    .admin-dashboard-stat-card .card-title {
        font-size: 0.58rem;
    }

    .admin-dashboard-stat-card .display-6 {
        font-size: 0.78rem;
    }
}

/* Phone-first working density across reservation app */
@media (max-width: 768px) {
    .admin-dashboard-stats {
        display: none;
    }

    .admin-dashboard-stats + .card,
    .app-page > .card:first-child,
    .app-page > .row:first-child > [class*="col-"] > .card {
        margin-top: 0 !important;
    }

    .card-body > .d-flex.justify-content-between > div h3,
    .card-body > .d-flex.justify-content-between > div h4,
    .card-body > .d-flex.justify-content-between > div h5 {
        margin-bottom: 0.18rem;
    }

    .card-body > .d-flex.justify-content-between > div p {
        margin-bottom: 0;
        font-size: 0.84rem;
    }

    .list-group-item {
        padding-top: 0.35rem;
        padding-bottom: 0.35rem;
        font-size: 0.86rem;
    }

    .teacher-actions,
    .change-password-actions,
    .reservation-form-modal__footer,
    .modal-footer {
        gap: 0.42rem;
    }

    .teacher-actions .btn,
    .change-password-actions .btn,
    .modal-footer .btn {
        min-height: 2.28rem;
    }

    .teacher-form .form-label,
    .reservation-form-modal .form-label,
    .user-form-card .teacher-form .form-label,
    .form-label {
        margin-bottom: 0.18rem;
        font-size: 0.82rem;
        font-weight: 800;
    }

    .form-text {
        margin-top: 0.16rem;
        font-size: 0.72rem;
        line-height: 1.25;
    }

    .input-group > .btn {
        min-width: 2.35rem;
        padding-right: 0.55rem;
        padding-left: 0.55rem;
    }

    .user-form-card {
        border-radius: 0.72rem;
    }

    .user-form-card .card-body {
        padding: 0.58rem;
    }

    .user-form-card .teacher-form > .row {
        gap: 0.42rem;
    }

    .user-form-card .teacher-form .form-control,
    .user-form-card .teacher-form .form-select,
    .user-form-card .teacher-form .btn {
        min-height: 2.25rem;
        font-size: 0.86rem;
    }

    .table-responsive table:not(.table-schedule):not(.admin-reservations-table) tr {
        margin-bottom: 0.48rem;
        border-radius: 0.72rem;
        box-shadow: 0 0.2rem 0.65rem rgba(31, 51, 73, 0.07);
    }

    .table-responsive table:not(.table-schedule):not(.admin-reservations-table) td {
        padding: 0.46rem 0.58rem;
        font-size: 0.84rem;
    }

    .table-responsive table:not(.table-schedule):not(.admin-reservations-table) td[data-label]::before {
        margin-bottom: 0.08rem;
        font-size: 0.66rem;
        letter-spacing: 0;
    }

    .table-responsive table:not(.table-schedule):not(.admin-reservations-table) td .btn {
        min-height: 2.18rem;
        margin: 0.12rem 0;
        font-size: 0.82rem;
    }

    .table-responsive table:not(.table-schedule) td .action-icon-group {
        gap: 0.35rem;
        padding-top: 0.05rem;
    }

    .table-responsive table:not(.table-schedule) td .action-icon-group .btn-icon,
    .admin-reservation-icon-btn,
    .admin-reservation-history {
        width: 2.25rem;
        min-width: 2.25rem;
        height: 2.25rem;
        min-height: 2.25rem;
        border-radius: 0.5rem;
    }

    .reservation-window-card {
        gap: 0.55rem;
        margin-bottom: 0.62rem;
        padding: 0.62rem;
    }

    .reservation-window-card__icon {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }

    .reservation-window-card__title {
        margin-bottom: 0.12rem;
        font-size: 0.9rem;
    }

    .reservation-window-card__text,
    .reservation-window-card__chips span {
        font-size: 0.78rem;
    }

    .reservation-window-card__chips {
        gap: 0.25rem;
        margin-top: 0.45rem;
    }

    .reservation-window-card__chips span {
        min-height: 1.6rem;
        padding: 0.22rem 0.42rem;
    }

    .schedule-card-grid {
        gap: 0.42rem;
    }

    .schedule-card {
        border-left-width: 0.25rem;
        border-radius: 0.62rem;
        padding: 0.5rem;
    }

    .schedule-card::before {
        height: 0.18rem;
    }

    .schedule-card-header {
        gap: 0.42rem;
    }

    .schedule-card-title {
        font-size: 0.86rem;
    }

    .schedule-card-time {
        margin-top: 0.08rem;
        font-size: 0.76rem;
    }

    .schedule-card-date {
        margin: 0.32rem 0;
        font-size: 0.76rem;
    }

    .schedule-card-body {
        min-height: 0;
    }

    .schedule-card-hours {
        gap: 0.24rem;
        margin-bottom: 0.42rem;
    }

    .schedule-card-hour {
        padding: 0.32rem 0.4rem;
        border-radius: 0.5rem;
    }

    .schedule-card-hour strong {
        font-size: 0.72rem;
    }

    .schedule-card-hour span {
        font-size: 0.7rem;
    }

    .schedule-card-hour__status small {
        font-size: 0.66rem;
    }

    .reserve-slot {
        min-height: 2.18rem;
        font-size: 0.82rem;
    }

    .reservation-form-modal .modal-dialog,
    #editReservationModal .modal-dialog {
        margin: 0.42rem;
    }

    .reservation-form-modal .modal-content,
    .admin-reservation-edit-form {
        border-radius: 0.78rem;
    }

    .reservation-form-modal__header,
    .modal-header {
        min-height: 0;
        padding: 0.58rem 0.7rem;
    }

    .reservation-form-modal__eyebrow {
        margin-bottom: 0.08rem;
        font-size: 0.68rem;
    }

    .reservation-form-modal .modal-title,
    .modal-title {
        font-size: 0.96rem;
        line-height: 1.15;
    }

    .reservation-form-modal .modal-body,
    .admin-reservation-edit-form .modal-body,
    .modal-body {
        gap: 0.5rem;
        padding: 0.62rem;
    }

    .modal-footer {
        padding: 0.55rem 0.65rem;
    }

    .weekly-calendar-modal .modal-dialog {
        width: 100vw;
        max-width: 100vw;
        height: 100dvh;
        margin: 0;
    }

    .weekly-calendar-modal .modal-content {
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
    }

    .weekly-calendar-modal .modal-header {
        min-height: 0;
        border-radius: 0;
        padding: 0.5rem 0.62rem;
    }

    .weekly-calendar-modal .modal-header .modal-title {
        font-size: 0.95rem;
    }

    .weekly-calendar-modal .modal-header p {
        font-size: 0.72rem;
        line-height: 1.18;
    }

    .weekly-calendar-modal .modal-body {
        padding: 0.42rem;
    }

    .weekly-calendar-toolbar {
        gap: 0.42rem;
        margin-bottom: 0.42rem;
        padding: 0.42rem;
        border-radius: 0.62rem;
    }

    .weekly-calendar-toolbar label {
        margin-bottom: 0.14rem;
        font-size: 0.76rem;
    }

    .weekly-calendar-toolbar__actions {
        grid-template-columns: 2.25rem 2.25rem 2.25rem;
        gap: 0.32rem;
    }

    .weekly-calendar-toolbar__actions .btn,
    .weekly-calendar-toolbar__actions .btn:not(.btn-success) {
        width: 2.25rem;
        min-width: 2.25rem;
        min-height: 2.25rem;
        border-radius: 0.55rem;
    }

    .weekly-calendar-scroll {
        border-radius: 0.58rem;
    }

    .weekly-calendar-table {
        min-width: 560px;
    }

    .weekly-calendar-table th,
    .weekly-calendar-table td {
        height: 31px;
        padding: 0.18rem 0.22rem;
        font-size: 0.62rem;
        line-height: 1.1;
    }

    .weekly-calendar-month-row th {
        height: 24px;
        font-size: 0.72rem;
    }

    .weekly-calendar-col-index,
    .weekly-calendar-index {
        width: 1.65rem;
        min-width: 1.65rem;
        max-width: 1.65rem;
    }

    .weekly-calendar-col-time,
    .weekly-calendar-time,
    .weekly-calendar-time-heading {
        width: 4.5rem;
        min-width: 4.5rem;
        max-width: 4.5rem;
    }

    .weekly-calendar-day-cell strong,
    .weekly-calendar-day-cell span,
    .weekly-calendar-day-cell em {
        font-size: 0.58rem;
        line-height: 1.08;
    }

    .weekly-calendar-modal .modal-footer {
        gap: 0.32rem;
        padding: 0.42rem 0.5rem calc(0.42rem + var(--app-safe-bottom));
    }

    .weekly-calendar-modal .modal-footer .btn,
    .weekly-calendar-modal .modal-footer .btn:not(.btn-success) {
        width: 2.25rem;
        min-width: 2.25rem;
        min-height: 2.25rem;
        border-radius: 0.55rem;
    }

    .admin-config-menu {
        gap: 0.42rem;
    }

    .admin-config-menu-button,
    .admin-year-tool-form .btn,
    .admin-reservations-pagination .btn {
        min-height: 2.28rem;
        font-size: 0.84rem;
    }
}

@media (max-width: 420px) {
    .weekly-calendar-table {
        min-width: 520px;
    }

    .weekly-calendar-table th,
    .weekly-calendar-table td {
        font-size: 0.58rem;
    }

    .weekly-calendar-col-time,
    .weekly-calendar-time,
    .weekly-calendar-time-heading {
        width: 4.05rem;
        min-width: 4.05rem;
        max-width: 4.05rem;
    }
}

/* Simple compact login */
.login-page {
    background: #eef6fa;
}

.login-background {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(232, 248, 253, 0.86)),
        url("../img/login-campus.jpeg") center / cover no-repeat;
}

.login-background::after {
    background: linear-gradient(180deg, rgba(23, 107, 152, 0.12), rgba(255, 255, 255, 0.72));
}

.login-shell {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    min-height: 100dvh;
    place-items: center;
    gap: 0.85rem;
    padding: clamp(1rem, 3vw, 2rem);
}

.login-brand-panel,
.login-benefits {
    display: none !important;
}

.login-access-panel {
    width: 100%;
    align-items: center;
}

.login-card {
    width: min(100%, 24rem);
    border: 1px solid rgba(186, 211, 224, 0.9);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 1rem 2.2rem rgba(31, 51, 73, 0.14);
    padding: 1rem;
    backdrop-filter: blur(12px) saturate(130%);
}

.login-card-brand {
    display: flex;
    align-items: center;
    gap: 0.72rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.78rem;
    border-bottom: 1px solid #e1edf3;
}

.login-card-brand img {
    width: 2.7rem;
    height: 2.7rem;
    object-fit: contain;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0.35rem 0.9rem rgba(31, 51, 73, 0.12);
}

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

.login-card-brand strong {
    color: #123c55;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.1;
}

.login-card-brand span {
    margin-top: 0.12rem;
    color: #526b7d;
    font-size: 0.8rem;
    line-height: 1.2;
}

.login-user-icon {
    display: none;
}

.login-card-heading {
    margin-bottom: 0.8rem;
    text-align: left;
}

.login-card-heading h2 {
    margin-bottom: 0.2rem;
    color: #123c55;
    font-size: 1.24rem;
    line-height: 1.16;
}

.login-card-heading p {
    color: #607487;
    font-size: 0.9rem;
    font-weight: 500;
}

.login-form {
    gap: 0.62rem;
}

.login-field .form-label {
    margin-bottom: 0.2rem;
    color: #263f58;
    font-size: 0.82rem;
}

.login-input-wrap {
    grid-template-columns: 2.35rem 1fr auto;
    min-height: 2.65rem;
    border-color: #c9dce7;
    border-radius: 0.68rem;
    background: #f8fbfd;
    box-shadow: none;
}

.login-input-wrap > i {
    color: #1685b1;
    font-size: 1rem;
}

.login-input-wrap .form-control {
    min-height: 2.6rem;
    color: #12324c;
    font-size: 0.93rem;
}

.login-password-toggle {
    width: 2.65rem;
    height: 2.6rem;
    color: #526b7d;
}

.login-options {
    color: #526b7d;
    font-size: 0.82rem;
}

.login-muted-link {
    display: none;
}

.login-remember input {
    width: 1rem;
    height: 1rem;
}

.login-submit {
    min-height: 2.65rem;
    border: 0;
    border-radius: 0.72rem;
    background: #176b98;
    box-shadow: 0 0.55rem 1.1rem rgba(23, 107, 152, 0.2);
    font-size: 0.94rem;
}

.login-submit:hover,
.login-submit:focus {
    background: #125b83;
}

.login-divider {
    display: none;
}

.login-home-link,
.pwa-install-login-button {
    min-height: 2.42rem;
    border-radius: 0.68rem;
    font-size: 0.88rem;
}

.login-home-link {
    border-color: #c9dce7;
    background: #ffffff;
    color: #126f96;
}

.pwa-install-login-button {
    border-color: #b9dceb;
    background: #edf8fc;
    color: #126f96;
}

.login-footer-text {
    width: min(100%, 24rem);
    margin: 0;
    color: #526b7d;
    font-size: 0.76rem;
    line-height: 1.25;
}

@media (max-width: 768px) {
    .login-page {
        background: #eef6fa;
    }

    .login-background {
        opacity: 1;
        background:
            linear-gradient(180deg, rgba(238, 246, 250, 0.94), rgba(255, 255, 255, 0.9)),
            url("../img/login-campus.jpeg") center / cover no-repeat;
    }

    .login-background::after {
        background: linear-gradient(180deg, rgba(23, 107, 152, 0.1), rgba(255, 255, 255, 0.8));
    }

    .login-shell {
        display: grid;
        grid-template-rows: 1fr auto;
        justify-content: center;
        min-height: 100dvh;
        padding: calc(0.85rem + var(--app-safe-top)) calc(0.75rem + var(--app-safe-right)) calc(0.75rem + var(--app-safe-bottom)) calc(0.75rem + var(--app-safe-left));
    }

    .login-card {
        width: min(100%, 22.5rem);
        padding: 0.82rem;
        border-radius: 0.9rem;
    }

    .login-card-brand {
        margin-bottom: 0.65rem;
        padding-bottom: 0.62rem;
    }

    .login-card-brand img {
        width: 2.35rem;
        height: 2.35rem;
    }

    .login-card-heading {
        margin-bottom: 0.62rem;
    }

    .login-card-heading h2 {
        font-size: 1.12rem;
    }

    .login-card-heading p {
        font-size: 0.82rem;
    }

    .login-form {
        gap: 0.5rem;
    }

    .login-input-wrap {
        min-height: 2.42rem;
    }

    .login-input-wrap .form-control,
    .login-password-toggle {
        min-height: 2.38rem;
        height: 2.38rem;
    }

    .login-submit {
        min-height: 2.48rem;
    }

    .login-footer-text {
        width: min(100%, 22.5rem);
        font-size: 0.68rem;
    }
}

/* Final desktop login restore: mobile simplification only */
@media (min-width: 769px) {
    .login-page {
        min-height: 100dvh;
        overflow-x: hidden;
        background: #061d4a;
    }

    .login-background {
        position: fixed;
        inset: 0;
        opacity: 1;
        background:
            radial-gradient(circle at 86% 12%, rgba(0, 202, 255, 0.62), transparent 28rem),
            linear-gradient(90deg, rgba(5, 24, 70, 0.98) 0%, rgba(5, 24, 70, 0.76) 34%, rgba(10, 126, 205, 0.34) 100%),
            url("../img/login-campus.jpeg") center / cover no-repeat;
    }

    .login-background::after {
        content: "";
        position: absolute;
        inset: 0;
        background:
            linear-gradient(180deg, rgba(2, 13, 45, 0.08), rgba(3, 25, 75, 0.46)),
            radial-gradient(circle at 11% 8%, transparent 0 11rem, rgba(255, 255, 255, 0.14) 11.1rem 11.18rem, transparent 11.3rem);
    }

    .login-shell {
        position: relative;
        z-index: 1;
        display: grid;
        grid-template-columns: minmax(18rem, 0.86fr) minmax(22rem, 1fr);
        grid-template-rows: 1fr auto auto;
        place-items: initial;
        gap: clamp(0.75rem, 2vw, 1.8rem);
        min-height: 100dvh;
        padding: clamp(0.75rem, 2vh, 1.6rem) clamp(1.5rem, 5vw, 4rem) 0.75rem;
    }

    .login-brand-panel {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .login-brand-content {
        max-width: clamp(24rem, 33vw, 34rem);
        color: #ffffff;
        text-align: center;
    }

    .login-logo {
        width: clamp(7.2rem, 9.5vw, 10rem);
        height: clamp(7.2rem, 9.5vw, 10rem);
        margin-bottom: clamp(0.75rem, 1.7vh, 1.25rem);
        object-fit: contain;
        filter: drop-shadow(0 1rem 1.8rem rgba(0, 0, 0, 0.38));
    }

    .login-welcome {
        margin: 0 0 0.8rem;
        color: #50d8ff;
        font-size: clamp(1rem, 1.25vw, 1.18rem);
    }

    .login-brand-content h1 {
        margin: 0;
        color: #ffffff;
        font-size: clamp(2rem, 3.15vw, 3.15rem);
        font-weight: 900;
        line-height: 1.14;
    }

    .login-brand-content h1 span {
        display: block;
        color: #4bd8ff;
    }

    .login-brand-copy {
        display: block;
        max-width: clamp(22rem, 28vw, 29rem);
        margin: 0.95rem auto 0;
        color: rgba(255, 255, 255, 0.9);
        font-size: clamp(0.95rem, 1.18vw, 1.08rem);
        line-height: 1.55;
    }

    .login-access-panel {
        display: flex;
        align-items: center;
        justify-content: center;
        width: auto;
    }

    .login-card {
        width: clamp(21rem, 31.5vw, 27rem);
        padding: clamp(0.78rem, 2vh, 1.35rem) clamp(1rem, 2.5vw, 1.7rem);
        border: 1px solid rgba(255, 255, 255, 0.46);
        border-radius: 1.05rem;
        background: linear-gradient(145deg, rgba(255, 255, 255, 0.57), rgba(255, 255, 255, 0.25));
        box-shadow: 0 1.8rem 4rem rgba(2, 18, 55, 0.38);
        backdrop-filter: blur(16px) saturate(145%);
    }

    .login-card-brand {
        display: none !important;
    }

    .login-user-icon {
        display: grid;
        width: clamp(3.6rem, 7vh, 4.75rem);
        height: clamp(3.6rem, 7vh, 4.75rem);
        margin: 0 auto clamp(0.45rem, 1.4vh, 0.9rem);
        border: 1px solid rgba(55, 216, 255, 0.85);
        border-radius: 50%;
        background: rgba(241, 252, 255, 0.72);
        box-shadow: 0 0 0 0.35rem rgba(64, 215, 255, 0.14), 0 0.55rem 1.4rem rgba(0, 104, 180, 0.18);
        color: #2168f3;
        place-items: center;
        font-size: clamp(1.55rem, 3.4vh, 2rem);
    }

    .login-card-heading {
        margin-bottom: clamp(0.55rem, 1.5vh, 1.1rem);
        text-align: center;
    }

    .login-card-heading h2 {
        margin-bottom: 0.25rem;
        color: #061d4a;
        font-size: clamp(1.25rem, 2.1vw, 1.75rem);
        font-weight: 900;
    }

    .login-card-heading p {
        color: rgba(6, 29, 74, 0.72);
        font-size: clamp(0.78rem, 1.2vw, 0.92rem);
        font-weight: 600;
    }

    .login-form {
        gap: clamp(0.45rem, 1.3vh, 0.78rem);
    }

    .login-field .form-label {
        color: #081f52;
    }

    .login-input-wrap {
        min-height: clamp(2.4rem, 6.3vh, 3.35rem);
        border-color: rgba(255, 255, 255, 0.58);
        border-radius: 0.75rem;
        background: rgba(255, 255, 255, 0.78);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    }

    .login-input-wrap > i {
        color: #1f65f2;
    }

    .login-input-wrap .form-control {
        min-height: clamp(2.35rem, 6.1vh, 3.25rem);
        color: #071d48;
    }

    .login-password-toggle {
        height: clamp(2.35rem, 6.1vh, 3.25rem);
        color: #35547f;
    }

    .login-options,
    .login-divider {
        color: #102553;
        font-size: clamp(0.78rem, 1.05vw, 0.9rem);
    }

    .login-muted-link {
        display: inline;
        color: #2563ff;
    }

    .login-submit {
        min-height: clamp(2.45rem, 6.25vh, 3.35rem);
        border: 1px solid rgba(255, 255, 255, 0.6);
        border-radius: 0.75rem;
        background: linear-gradient(100deg, #3157ff 0%, #00c8ee 100%);
        box-shadow: 0 0.9rem 1.7rem rgba(0, 105, 229, 0.28);
        font-size: clamp(0.9rem, 1.25vw, 1.02rem);
    }

    .login-divider {
        display: flex;
    }

    .login-home-link {
        min-height: clamp(2.35rem, 5.95vh, 3.15rem);
        border: 1px solid rgba(255, 255, 255, 0.52);
        border-radius: 0.75rem;
        background: rgba(255, 255, 255, 0.26);
        color: #245cff;
    }

    .pwa-install-login-button {
        border-color: rgba(55, 216, 255, 0.58);
        background: rgba(255, 255, 255, 0.72);
        color: #123c55;
    }

    .login-benefits {
        grid-column: 1 / -1;
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: clamp(0.35rem, 1vw, 0.75rem);
        align-items: center;
        margin-top: auto;
    }

    .login-footer-text {
        grid-column: 1 / -1;
        width: auto;
        margin: 0;
        color: rgba(255, 255, 255, 0.78);
        text-align: center;
        font-size: clamp(0.72rem, 1vw, 0.84rem);
    }
}

/* Final mobile-only admin user layout */
@media (max-width: 768px) {
    .user-form-column {
        display: contents;
    }

    body.mobile-user-form-open {
        overflow: hidden;
    }

    body.mobile-user-form-open::after {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 1310;
        background: rgba(15, 23, 42, 0.48);
        backdrop-filter: blur(4px);
    }

    .user-form-card {
        position: fixed;
        inset: calc(0.55rem + var(--app-safe-top)) calc(0.55rem + var(--app-safe-right)) calc(0.55rem + var(--app-safe-bottom)) calc(0.55rem + var(--app-safe-left));
        z-index: 1320;
        display: none;
        overflow: hidden;
        border-radius: 0.9rem;
        box-shadow: 0 1.2rem 3rem rgba(15, 23, 42, 0.34) !important;
    }

    body.mobile-user-form-open .user-form-card {
        display: block;
    }

    .user-form-card .card-body {
        display: flex;
        max-height: 100%;
        flex-direction: column;
        overflow-y: auto;
        padding: 0.72rem;
    }

    .user-form-card__header {
        position: sticky;
        top: -0.72rem;
        z-index: 2;
        margin: -0.72rem -0.72rem 0.55rem;
        border-bottom: 1px solid #d9e7ef;
        background: #ffffff;
        padding: 0.62rem 0.72rem;
    }

    .user-form-card__header .card-title {
        margin: 0;
        font-size: 1rem;
    }

    .user-form-card .teacher-form > .row {
        grid-template-columns: 1fr;
        gap: 0.48rem;
    }

    .user-form-card .teacher-form > .row > [class*="user-form-"] {
        grid-column: 1 / -1;
    }

    .user-form-card .teacher-actions--form {
        position: sticky;
        bottom: -0.72rem;
        z-index: 2;
        align-items: stretch;
        justify-content: stretch;
        margin: 0.25rem -0.72rem -0.72rem !important;
        border-top: 1px solid #d9e7ef;
        background: #ffffff;
        padding: 0.58rem 0.72rem;
    }

    .user-form-card .teacher-actions--form .btn {
        width: 100%;
    }

    .admin-users-table-wrap {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        border: 1px solid #d5e0ea;
        border-radius: 0.68rem;
        background: #ffffff;
    }

    .admin-users-table {
        display: table;
        min-width: 920px;
        margin-bottom: 0;
        table-layout: fixed;
        white-space: normal;
    }

    .admin-users-table thead {
        display: table-header-group !important;
    }

    .admin-users-table tbody {
        display: table-row-group !important;
    }

    .admin-users-table tr {
        display: table-row !important;
        width: auto !important;
        margin: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    .admin-users-table th,
    .admin-users-table td {
        display: table-cell !important;
        width: auto;
        border: 1px solid #dce8ef !important;
        padding: 0.34rem 0.4rem !important;
        color: #1f3349;
        font-size: 0.7rem !important;
        line-height: 1.16;
        vertical-align: middle;
        overflow-wrap: anywhere;
    }

    .admin-users-table th {
        background: #e8f8fd !important;
        color: #0d526f;
        font-size: 0.62rem !important;
        font-weight: 900;
        text-transform: uppercase;
    }

    .admin-users-table td[data-label]::before {
        content: none !important;
    }

    .admin-users-table th:nth-child(1),
    .admin-users-table td:nth-child(1) {
        width: 10rem;
    }

    .admin-users-table th:nth-child(2),
    .admin-users-table td:nth-child(2) {
        width: 6rem;
    }

    .admin-users-table th:nth-child(3),
    .admin-users-table td:nth-child(3) {
        width: 10rem;
    }

    .admin-users-table th:nth-child(4),
    .admin-users-table td:nth-child(4) {
        width: 6rem;
    }

    .admin-users-table th:nth-child(5),
    .admin-users-table td:nth-child(5) {
        width: 7.2rem;
    }

    .admin-users-table th:nth-child(6),
    .admin-users-table td:nth-child(6) {
        width: 6.4rem;
    }

    .admin-users-table th:nth-child(7),
    .admin-users-table td:nth-child(7) {
        width: 4.6rem;
        text-align: center;
    }

    .admin-users-table th:nth-child(8),
    .admin-users-table td:nth-child(8) {
        width: 6.2rem;
    }

    .admin-users-table code {
        font-size: 0.68rem;
        white-space: nowrap;
    }

    .admin-users-table .action-icon-group {
        display: inline-flex !important;
        gap: 0.3rem !important;
        white-space: nowrap;
    }

    .admin-users-table .action-icon-group form {
        display: inline-flex !important;
        margin: 0;
    }

    .admin-users-table .btn-icon {
        width: 2rem !important;
        min-width: 2rem !important;
        height: 2rem !important;
        min-height: 2rem !important;
        border-radius: 0.45rem !important;
    }
}
@media (max-width: 768px) {
    .mobile-user-form-toggle {
        display: inline-flex;
    }

    .user-form-card__close {
        display: grid;
        flex: 0 0 auto;
    }
}

/* Final mobile-only admin reservations layout */
.mobile-reservation-form-toggle,
.admin-reservation-create-close {
    display: none;
}

.admin-reservations-actions-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .mobile-reservation-form-toggle {
        display: inline-flex;
    }

    body.mobile-reservation-form-open {
        overflow: hidden;
    }

    body.mobile-reservation-form-open::after {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 1310;
        background: rgba(15, 23, 42, 0.48);
        backdrop-filter: blur(4px);
    }

    .admin-reservation-create-close {
        display: grid;
        flex: 0 0 auto;
    }

    .admin-reservation-create-card {
        position: fixed;
        inset: calc(0.55rem + var(--app-safe-top)) calc(0.55rem + var(--app-safe-right)) calc(0.55rem + var(--app-safe-bottom)) calc(0.55rem + var(--app-safe-left));
        z-index: 1320;
        display: none;
        overflow: hidden;
        margin: 0 !important;
        border-radius: 0.9rem;
        box-shadow: 0 1.2rem 3rem rgba(15, 23, 42, 0.34) !important;
    }

    body.mobile-reservation-form-open .admin-reservation-create-card {
        display: block;
    }

    .admin-reservation-create-card .card-body {
        display: flex;
        max-height: 100%;
        flex-direction: column;
        overflow-y: auto;
        padding: 0.72rem;
    }

    .admin-reservation-create-header {
        position: sticky;
        top: -0.72rem;
        z-index: 2;
        align-items: flex-start !important;
        gap: 0.65rem;
        margin: -0.72rem -0.72rem 0.55rem !important;
        border-bottom: 1px solid #d9e7ef;
        background: #ffffff;
        padding: 0.62rem 0.72rem;
    }

    .admin-reservation-create-header h4 {
        margin: 0;
        font-size: 1rem;
    }

    .admin-reservation-create-header p {
        display: none;
    }

    #adminReservationCreateForm {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.5rem !important;
        margin: 0;
    }

    #adminReservationCreateForm > [class*="col-"] {
        width: auto;
        max-width: none;
        padding: 0;
    }

    #adminReservationCreateForm .form-label {
        margin-bottom: 0.18rem;
        font-size: 0.78rem;
        font-weight: 800;
    }

    #adminReservationCreateForm .form-control,
    #adminReservationCreateForm .form-select,
    #adminReservationCreateForm .btn {
        min-height: 2.2rem;
        font-size: 0.84rem;
    }

    #adminReservationCreateForm .form-text {
        margin-top: 0.18rem;
        font-size: 0.66rem;
        line-height: 1.22;
    }

    #adminReservationCreateForm .btn-group {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        gap: 0.35rem;
    }

    #adminReservationCreateForm .btn-group > .btn {
        border-radius: 0.55rem !important;
    }

    #adminReservationCreateForm .d-flex.flex-wrap.gap-2 {
        gap: 0.35rem !important;
    }

    #adminReservationCreateForm .btn-check + .btn {
        flex: 1 1 calc(50% - 0.35rem);
        padding: 0.38rem 0.45rem;
        white-space: normal;
    }

    #adminReservationCreateForm .col-md-3.d-grid.align-self-end {
        position: sticky;
        bottom: -0.72rem;
        z-index: 2;
        margin: 0.2rem -0.72rem -0.72rem;
        border-top: 1px solid #d9e7ef;
        background: #ffffff;
        padding: 0.58rem 0.72rem;
    }

    .admin-reservations-actions-bar {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .admin-reservations-actions-bar .btn {
        width: 100%;
        margin: 0 !important;
    }

    .admin-reservations-scroll {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        border: 1px solid #d5e0ea;
        border-radius: 0.68rem;
        background: #ffffff;
    }

    .admin-reservations-table {
        display: table;
        min-width: 740px;
        margin-bottom: 0;
        table-layout: fixed;
        white-space: normal;
    }

    .admin-reservations-table thead {
        display: table-header-group !important;
    }

    .admin-reservations-table tbody {
        display: table-row-group !important;
    }

    .admin-reservations-table tr {
        display: table-row !important;
        width: auto !important;
        margin: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    .admin-reservations-table th,
    .admin-reservations-table td {
        display: table-cell !important;
        width: auto;
        border: 1px solid #dce8ef !important;
        padding: 0.32rem 0.38rem !important;
        color: #1f3349;
        font-size: 0.68rem !important;
        line-height: 1.16;
        vertical-align: middle;
        overflow-wrap: anywhere;
    }

    .admin-reservations-table th {
        background: #e8f8fd !important;
        color: #0d526f;
        font-size: 0.6rem !important;
        font-weight: 900;
        text-transform: uppercase;
    }

    .admin-reservations-table th:nth-child(8),
    .admin-reservations-table td:nth-child(8) {
        display: none !important;
    }

    .admin-reservations-table td[data-label]::before {
        content: none !important;
    }

    .admin-reservations-table th:nth-child(1),
    .admin-reservations-table td:nth-child(1) {
        width: 5.4rem;
    }

    .admin-reservations-table th:nth-child(2),
    .admin-reservations-table td:nth-child(2) {
        width: 7rem;
    }

    .admin-reservations-table th:nth-child(3),
    .admin-reservations-table td:nth-child(3) {
        width: 4.2rem;
    }

    .admin-reservations-table th:nth-child(4),
    .admin-reservations-table td:nth-child(4) {
        width: 8.8rem;
    }

    .admin-reservations-table th:nth-child(5),
    .admin-reservations-table td:nth-child(5) {
        width: 5.2rem;
    }

    .admin-reservations-table th:nth-child(6),
    .admin-reservations-table td:nth-child(6) {
        width: 8rem;
    }

    .admin-reservations-table th:nth-child(7),
    .admin-reservations-table td:nth-child(7) {
        width: 5.2rem;
    }

    .admin-reservations-table th:nth-child(9),
    .admin-reservations-table td:nth-child(9) {
        width: 6.8rem;
    }

    .admin-reservations-table th:nth-child(10),
    .admin-reservations-table td:nth-child(10) {
        width: 5.4rem;
        text-align: center;
    }

    .admin-reservations-table small {
        display: block;
        margin-top: 0.1rem;
        font-size: 0.62rem;
        line-height: 1.1;
    }

    .admin-reservation-actions {
        gap: 0.28rem;
    }

    .admin-reservation-icon-btn,
    .admin-reservation-history {
        width: 1.95rem !important;
        min-width: 1.95rem !important;
        height: 1.95rem !important;
        min-height: 1.95rem !important;
        border-radius: 0.45rem !important;
    }
}
@media (max-width: 768px) {
    .admin-reservation-create-header {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 0.5rem !important;
        min-height: 2.55rem;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .admin-reservation-create-header > div {
        min-width: 0;
    }

    .admin-reservation-create-header h4 {
        overflow: hidden;
        max-width: 100%;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .card-body > .admin-reservation-create-header .admin-reservation-create-close {
        width: 1.75rem !important;
        min-width: 1.75rem !important;
        height: 1.75rem !important;
        min-height: 1.75rem !important;
        margin-left: auto !important;
        padding: 0.25rem !important;
        border-radius: 50%;
    }
}

/* Final mobile-only reservation filters */
.admin-reservations-filter-title,
.mobile-filter-label {
    display: none;
}

@media (max-width: 768px) {
    .admin-reservations-filter-form {
        gap: 0.5rem !important;
        margin: 0 0 0.72rem !important;
        border: 1px solid #d5e0ea;
        border-radius: 0.72rem;
        background: #f7fbfd;
        padding: 0.62rem;
    }

    .admin-reservations-filter-title {
        display: inline-flex;
        align-items: center;
        gap: 0.38rem;
        padding: 0 0.05rem 0.08rem;
        color: #0d526f;
        font-size: 0.82rem;
        font-weight: 900;
    }

    .mobile-filter-label {
        display: block;
        margin-bottom: 0.18rem;
        color: #25445d;
        font-size: 0.68rem;
        font-weight: 900;
        line-height: 1.1;
        text-transform: uppercase;
    }

    .admin-reservations-filter-form > [class*="col-"] {
        padding: 0;
    }

    .admin-reservations-filter-form .form-control {
        min-height: 2.3rem;
        border-color: #cbdce7;
        border-radius: 0.58rem;
        background: #ffffff;
        font-size: 0.84rem;
    }

    .admin-reservations-filter-form .btn {
        min-height: 2.25rem;
        border-radius: 0.58rem;
        font-size: 0.82rem;
        font-weight: 800;
    }
}

/* Final holiday/interferiado calendar override */
.weekly-calendar-table thead th.weekly-calendar-blocked-heading,
.weekly-calendar-table .weekly-calendar-day.weekly-calendar-blocked-heading,
.weekly-calendar-table .weekly-calendar-date-heading.weekly-calendar-blocked-heading {
    background: #fecaca !important;
    color: #111827 !important;
    text-align: center;
}
.weekly-calendar-table .weekly-calendar-blocked-heading span {
    display: block !important;
    margin-top: 0.18rem;
    color: #111827 !important;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.15;
    white-space: normal;
}
.weekly-calendar-table .weekly-calendar-day-cell.weekly-calendar-blocked,
.weekly-calendar-table .weekly-calendar-break.weekly-calendar-blocked {
    background: #fff5f5 !important;
    border-left: 4px solid #f87171 !important;
    color: #111827 !important;
    text-align: center;
}
.weekly-calendar-table .weekly-calendar-day-cell.weekly-calendar-blocked strong,
.weekly-calendar-table .weekly-calendar-day-cell.weekly-calendar-blocked span,
.weekly-calendar-table .weekly-calendar-day-cell.weekly-calendar-blocked em {
    display: block !important;
    margin: 0;
    color: inherit !important;
    line-height: 1.22 !important;
    white-space: normal;
    overflow-wrap: anywhere;
}
.weekly-calendar-table .weekly-calendar-day-cell.weekly-calendar-blocked strong {
    display: block !important;
    background: transparent !important;
    padding: 0;
    font-weight: 900;
}
.weekly-calendar-table .weekly-calendar-day-cell.weekly-calendar-blocked span {
    font-weight: 700;
}
.weekly-calendar-table .weekly-calendar-day-cell.weekly-calendar-blocked em {
    margin-bottom: 0;
    color: #111827 !important;
    font-style: normal;
    font-weight: 700;
}

/* Final mobile admin users action buttons */
@media (max-width: 768px) {
    #usuarios-registrados .card-body > .d-flex.justify-content-between {
        align-items: stretch !important;
        gap: 0.7rem;
    }

    #usuarios-registrados .admin-users-actions {
        display: grid !important;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem;
    }

    #usuarios-registrados .admin-users-actions .btn {
        width: 100% !important;
        min-height: 2.35rem;
        margin: 0 !important;
        padding: 0.42rem 0.35rem;
        font-size: 0.78rem;
        line-height: 1.08;
        white-space: normal;
    }

    #usuarios-registrados .admin-users-actions .btn i {
        margin-right: 0.22rem;
        font-size: 0.86rem;
    }

    #usuarios-registrados .admin-users-refresh-button {
        display: none !important;
    }

    #usuarios-registrados .admin-users-filter-form {
        gap: 0.5rem !important;
        margin: 0 0 0.72rem !important;
        border: 1px solid #d5e0ea;
        border-radius: 0.72rem;
        background: #f7fbfd;
        padding: 0.62rem;
    }

    #usuarios-registrados .admin-users-filter-form > [class*="col-"] {
        padding: 0;
    }

    #usuarios-registrados .admin-users-filter-form > [class*="col-"]:not(.admin-users-filter-action) {
        width: 100%;
        flex: 0 0 100%;
    }

    #usuarios-registrados .admin-users-filter-form .admin-users-filter-action {
        width: calc(50% - 0.25rem);
        flex: 0 0 calc(50% - 0.25rem);
        min-width: 0;
    }

    #usuarios-registrados .admin-users-filter-form .form-control {
        min-height: 2.3rem;
        border-color: #cbdce7;
        border-radius: 0.58rem;
        background: #ffffff;
        font-size: 0.84rem;
    }

    #usuarios-registrados .admin-users-filter-form .btn {
        min-height: 2.28rem;
        border-radius: 0.58rem;
        font-size: 0.82rem;
        font-weight: 800;
    }
}

/* Final mobile admin reservations action buttons */
@media (max-width: 768px) {
    #reservas-registradas .card-body > .d-flex.justify-content-between {
        align-items: stretch !important;
        gap: 0.7rem;
    }

    #reservas-registradas .admin-reservations-actions-bar {
        display: grid !important;
        width: 100%;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.35rem;
    }

    #reservas-registradas .admin-reservations-actions-bar .btn {
        width: 100% !important;
        min-height: 2.35rem;
        margin: 0 !important;
        padding: 0.4rem 0.24rem;
        font-size: 0.7rem;
        line-height: 1.08;
        white-space: normal;
    }

    #reservas-registradas .admin-reservations-actions-bar .btn i {
        margin-right: 0.16rem;
        font-size: 0.78rem;
    }

    #reservas-registradas .admin-reservations-filter-form .admin-reservations-filter-action {
        width: auto;
        flex: initial;
    }

    #reservas-registradas .admin-reservations-filter-form .admin-reservations-filter-action .btn {
        width: 100%;
        min-height: 2.28rem;
        margin: 0 !important;
        font-size: 0.82rem;
    }
}

/* Final mobile reservations filter buttons in one row */
@media (max-width: 768px) {
    #reservas-registradas .admin-reservations-filter-form {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem !important;
    }

    #reservas-registradas .admin-reservations-filter-form > [class*="col-"]:not(.admin-reservations-filter-action),
    #reservas-registradas .admin-reservations-filter-title {
        grid-column: 1 / -1;
        width: 100%;
    }

    #reservas-registradas .admin-reservations-filter-form .admin-reservations-filter-action {
        grid-column: auto;
        width: 100% !important;
        min-width: 0;
    }
}

/* Final mobile date input visibility */
@media (max-width: 768px) {
    input[type="date"].form-control,
    .form-control[type="date"] {
        min-height: 2.3rem;
        border: 1px solid #cbdce7 !important;
        border-radius: 0.42rem;
        background-color: #ffffff !important;
        color: #1f3349 !important;
        color-scheme: light;
        font-size: 0.9rem;
        line-height: 1.2;
        opacity: 1;
        -webkit-appearance: auto;
        appearance: auto;
    }

    input[type="date"].form-control::-webkit-datetime-edit,
    .form-control[type="date"]::-webkit-datetime-edit,
    input[type="date"].form-control::-webkit-datetime-edit-fields-wrapper,
    .form-control[type="date"]::-webkit-datetime-edit-fields-wrapper {
        color: #1f3349;
    }

    input[type="date"].form-control:invalid::-webkit-datetime-edit,
    .form-control[type="date"]:invalid::-webkit-datetime-edit {
        color: #1f3349;
    }

    input[type="date"].form-control::-webkit-calendar-picker-indicator,
    .form-control[type="date"]::-webkit-calendar-picker-indicator {
        opacity: 1;
        filter: none;
    }
}
