/* Student portal — mobile app shell (≤991.98px) */

.student-portal {
    --stu-bottom-nav-height: 4rem;
    --stu-safe-bottom: env(safe-area-inset-bottom, 0px);
    --stu-sticky-offset: calc(var(--stu-bottom-nav-height) + var(--stu-safe-bottom));
}

/* ── Bottom navigation ── */
.stu-bottom-nav {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 1030;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    gap: 0.15rem;
    min-height: var(--stu-bottom-nav-height);
    padding: 0.35rem 0.5rem calc(0.35rem + var(--stu-safe-bottom));
    background: rgba(var(--bs-body-bg-rgb, 255, 255, 255), 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--erp-border, var(--bs-border-color));
    box-shadow: 0 -6px 24px rgba(15, 23, 42, 0.08);
}

.stu-bottom-nav__item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-width: 0;
    min-height: 44px;
    padding: 0.25rem 0.15rem;
    border: 0;
    border-radius: 0.75rem;
    background: transparent;
    color: var(--bs-secondary-color);
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
    transition: color 0.15s ease, background 0.15s ease;
}

.stu-bottom-nav__item:hover,
.stu-bottom-nav__item:focus-visible {
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), 0.06);
}

.stu-bottom-nav__item.is-active {
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), 0.1);
}

.stu-bottom-nav__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    font-size: 1.15rem;
}

.stu-bottom-nav__label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Mobile shell layout ── */
@media (max-width: 991.98px) {
    .student-portal .admin-content {
        padding: 1rem 1rem calc(var(--stu-sticky-offset) + 0.75rem);
    }

    .student-portal .toast-container {
        bottom: calc(var(--stu-sticky-offset) + 0.5rem) !important;
    }

    .student-portal .stu-detail-sticky-bar {
        bottom: var(--stu-sticky-offset);
    }

    .student-portal .prof-save-sticky {
        bottom: var(--stu-sticky-offset);
    }

    .student-portal #profilePageRoot {
        padding-bottom: 4.5rem;
    }
}

/* ── Compact welcome hero ── */
@media (max-width: 991.98px) {
    .student-portal .erp-system-hero--welcome .erp-system-hero__chip {
        display: none !important;
    }
}

/* ── Home page shortcuts ── */
.stu-home-shortcuts {
    display: none;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

@media (max-width: 991.98px) {
    .stu-home-shortcuts {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.15rem;
    }

    .stu-home-shortcuts::-webkit-scrollbar {
        display: none;
    }
}

.stu-home-shortcut {
    flex: 1 1 0;
    min-width: 6.5rem;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 44px;
    padding: 0.65rem 0.5rem;
    border: 1px solid var(--erp-border, var(--bs-border-color));
    border-radius: 0.85rem;
    background: var(--bs-body-bg);
    color: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.stu-home-shortcut:hover,
.stu-home-shortcut:focus-visible {
    border-color: rgba(var(--bs-primary-rgb), 0.35);
    background: rgba(var(--bs-primary-rgb), 0.04);
}

.stu-home-shortcut__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.65rem;
    font-size: 1rem;
}

.stu-home-shortcut__icon--new {
    background: rgba(13, 148, 136, 0.12);
    color: #0d9488;
}

.stu-home-shortcut__icon--track {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}

.stu-home-shortcut__icon--rate {
    background: rgba(var(--bs-primary-rgb), 0.12);
    color: var(--bs-primary);
}

/* ── Beneficiary care mobile tweaks ── */
@media (max-width: 991.98px) {
    .student-portal .bc-stu-page {
        margin-inline: -0.25rem;
    }


    .student-portal .bc-stu-composer {
        padding-bottom: 0.25rem;
    }

    .student-portal .fam-page-root {
        padding-bottom: 0.5rem;
    }

}

/* ── Service submit mobile ── */
@media (max-width: 991.98px) {
    .student-portal .svc-submit-page .btn-primary,
    .student-portal .svc-submit-page .btn-success {
        width: 100%;
        min-height: 44px;
    }

    .student-portal .stu-detail-sticky-inner .btn {
        min-height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .stu-bottom-nav__item,
    .stu-home-shortcut {
        transition: none;
    }
}
