/* Student UI: deliberately no rules outside this breakpoint.
   Desktop layout and printable forms remain unchanged. */
@media screen and (max-width: 767px) {
    html { -webkit-text-size-adjust: 100%; }
    body { overflow-wrap: anywhere; }
    *, *::before, *::after { box-sizing: border-box; }
    input, select, textarea { min-width: 0; max-width: 100%; }
    .form-control, .form-select, select, textarea,
    input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]) {
        font-size: 16px;
    }
    input[type=file] { width: 100%; height: auto; white-space: normal; }
    img, video, iframe { max-width: 100%; }
    .btn, .btn-soft, .btn-soft2, .btn-primary-soft, .lang-btn, .lang-link,
    .logout-btn, .pdfBtn, button { min-height: 44px; white-space: normal; }
    a.btn, a.lang-btn, a.logout-btn { align-content: center; }
    .container, .wrap { max-width: 100%; }
    .portal-header { padding: 16px 0; margin-bottom: 18px; }
    .portal-header > .container, .portal-topbar-inner, .toprow { flex-direction: column; align-items: stretch !important; gap: 12px; }
    .portal-actions, .portal-actions > div { flex-wrap: wrap; gap: 8px; }
    .portal-actions { justify-content: flex-start !important; width: 100%; }
    .portal-brand, .portal-brand-text, .portal-header h5 { min-width: 0; }
    .portal-logo, .brand-logo { flex-shrink: 0; }
    .portal-header .lang-btn, .portal-topbar .lang-btn { display: inline-flex; align-items: center; justify-content: center; }
    .menu-card .card-body {
        display: grid; grid-template-columns: 46px minmax(0, 1fr);
        align-items: center; gap: 6px 14px; padding: 18px 20px; text-align: left !important;
    }
    .menu-card .icon-circle { width: 46px; height: 46px; font-size: 1.25rem; grid-row: 1 / span 2; margin: 0; }
    .menu-card .menu-title { font-size: 1rem; line-height: 1.4; margin: 0; text-align: left; }
    .menu-card .soon-badge { grid-column: 2; justify-self: start; margin-top: 0 !important; }
    .menu-card { min-height: 96px; }
    .row > [class*=col-]:has(> .menu-card) { margin-bottom: 12px !important; }
    .card.p-4, section.card.p-4 { padding: 18px !important; }
    .notif-overlay { padding: 12px; overflow-y: auto; }
    .notif-pop { max-height: calc(100dvh - 24px); display: flex; flex-direction: column; }
    .notif-pop-b { overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
    .notif-pop-h, .notif-pop-f { flex-shrink: 0; }
    .notif-pop-h .x { width: 44px; height: 44px; flex-shrink: 0; }
    .notif-item .l, .notif-left { min-width: 0; }
    .notif-ic, .notif-left .icon, .notif-pill, .notif-row > .pill { flex-shrink: 0; }
    .notif-row { gap: 10px; }
    .details-wrap { padding: 0 16px 16px; }
    .details-item { flex-direction: column; gap: 4px; }
    .details-meta { white-space: normal; }
    .grid { min-width: 0; }
    .grid > *, .duyuru > div, .list-item { min-width: 0; }
    .duyuru .icon { flex-shrink: 0; }
    .card-title, .read-filters { flex-wrap: wrap; }
    .card-soft > .card-body.d-flex { flex-direction: column; gap: 12px; }
    .card-soft > .card-body.d-flex > div { min-width: 0; width: 100%; text-align: left !important; }
    .card-soft .badge { white-space: normal; line-height: 1.5; }
    .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table-responsive table { min-width: 480px; }
    .modal-box { width: 100%; max-height: calc(100dvh - 24px); overflow-y: auto; }
    .kv { flex-wrap: wrap; }
    .kv .k, .kv .v { white-space: normal; min-width: 0; }
    body:has(.login-card), body:has(form input[name=current_password]) {
        height: auto; min-height: 100dvh; padding: 16px; align-items: flex-start;
    }
    .login-card { margin: auto; padding: 24px 20px; }
}
