:root {
    --student-blue: #0b5fc7;
    --student-blue-dark: #084a9c;
    --student-red: #e43f4d;
    --student-bg: #f7f8fa;
    --student-card: #ffffff;
    --student-soft-card: #f0f0f0;
    --student-text: #14171b;
    --student-muted: #6c737e;
    --student-line: #e9ebef;
    --student-shadow: 0 14px 36px rgba(17, 36, 61, 0.08);
    --student-radius: 18px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--student-text);
    background: var(--student-bg);
}
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
.student-svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* LOGIN - dikekalkan daripada Fasa 1 */
.student-login-body {
    min-height: 100vh;
    min-height: 100dvh;
    background: linear-gradient(180deg, var(--student-blue) 0 34%, var(--student-bg) 34% 100%);
}
.student-login-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 28px 18px;
}
.student-login-card {
    width: min(100%, 430px);
    background: var(--student-card);
    border-radius: 28px;
    padding: 30px 24px;
    box-shadow: var(--student-shadow);
}
.student-login-logo-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
}

.student-login-logo {
    display: block;
    width: min(100%, 290px);
    height: auto;
    object-fit: contain;
}
.student-eyebrow {
    margin: 0;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--student-muted);
    font-weight: 700;
}
.student-login-card h1 { margin: 6px 0 8px; font-size: 30px; }
.student-login-subtitle { margin: 0 0 24px; color: var(--student-muted); line-height: 1.5; }
.student-alert { border-radius: 14px; padding: 12px 14px; margin: 0 0 18px; font-size: 14px; line-height: 1.45; }
.student-alert-error { background: #fff0f0; color: #9b272d; }
.student-alert-info { background: #edf5ff; color: #174f91; }
.student-form { display: grid; gap: 9px; }
.student-form label { margin-top: 7px; font-size: 14px; font-weight: 700; }
.student-form input {
    width: 100%;
    min-height: 50px;
    border: 1px solid #d8dee8;
    border-radius: 14px;
    padding: 0 14px;
    outline: none;
    background: #fff;
    color: var(--student-text);
}
.student-form input:focus { border-color: var(--student-blue); box-shadow: 0 0 0 3px rgba(11, 95, 199, .12); }
.student-password-wrap { position: relative; }
.student-password-wrap input { padding-right: 72px; }
.student-password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    border-radius: 10px;
    padding: 8px 10px;
    background: #eef3fa;
    color: var(--student-blue-dark);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}
.student-primary-button {
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 14px;
    background: var(--student-blue);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    margin-top: 14px;

    display: grid;
    place-items: center;

    text-align: center;
    text-decoration: none;
    line-height: 1.2;
}
.student-primary-button:hover { background: var(--student-blue-dark); }
.student-login-help { margin: 20px 0 0; color: var(--student-muted); font-size: 13px; text-align: center; }

/* DASHBOARD V4 - gaya app profesional */
.student-app-body {
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: 82px;
    background: var(--student-bg);
}
.student-hero {
    background:
        linear-gradient(rgba(11, 95, 199, 0.84), rgba(8, 74, 156, 0.88)),
        url('../img/logo/gambar_kolej.JPG') center center / cover no-repeat;
    color: #fff;
    min-height: 250px;
    padding: max(22px, env(safe-area-inset-top)) 18px 70px;
}
.student-hero-inner {
    width: min(100%, 1180px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.student-hero-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}
.student-hero-logo-wrap {
    width: 88px;
    height: 88px;
    flex: 0 0 88px;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
    padding: 8px;
    box-shadow: 0 10px 26px rgba(0,0,0,.09);
}
.student-hero-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}
.student-hero-copy { min-width: 0; }
.student-hero-eyebrow {
    margin: 0 0 3px;
    color: rgba(255,255,255,.78);
    font-size: 12px;
    font-weight: 600;
}
.student-hero-copy h1 {
    margin: 0;
    font-size: clamp(19px, 5.4vw, 26px);
    line-height: 1.14;
    font-weight: 800;
    overflow-wrap: anywhere;
}
.student-hero-meta {
    margin: 6px 0 0;
    color: rgba(255,255,255,.92);
    font-size: 13px;
    font-weight: 600;
}
.student-hero-program {
    margin: 6px 0 0;
    color: rgba(255,255,255,.78);
    font-size: 12px;
    line-height: 1.35;
}
.student-hero-logout {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
    background: #fff;
    color: var(--student-blue);
    display: grid;
    place-items: center;
    box-shadow: 0 7px 18px rgba(0,0,0,.08);
}
.student-hero-logout svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.student-home-main {
    width: min(100%, 1180px);
    margin: -54px auto 0;
    padding: 0 16px 28px;
}
.student-quick-panel {
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--student-shadow);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 104px;
    overflow: hidden;
}
.student-quick-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 8px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}
.student-quick-item + .student-quick-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 1px;
    background: var(--student-line);
}
.student-quick-item svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: #15181c;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.student-quick-item[aria-disabled="true"] { cursor: default; }

.student-home-desktop-grid { margin-top: 26px; }
.student-home-primary { min-width: 0; }
.student-outstanding-card {
    background: var(--student-soft-card);
    border-radius: 12px;
    padding: 20px 20px 19px;
}
.student-home-label {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #2c3035;
}
.student-outstanding-card strong {
    display: block;
    margin: 8px 0 0;
    font-size: clamp(28px, 7.5vw, 36px);
    line-height: 1;
    letter-spacing: -.025em;
    color: #111316;
}
.student-fee-status {
    margin: 8px 0 0;
    font-size: 11px;
    line-height: 1.4;
    color: var(--student-muted);
}
.student-outstanding-card.fee-overdue strong,
.student-outstanding-card.fee-due-today strong,
.student-outstanding-card.fee-upcoming strong,
.student-outstanding-card.fee-outstanding strong { color: #171a1e; }
.student-outstanding-card.fee-overdue .student-fee-status,
.student-outstanding-card.fee-due-today .student-fee-status { color: #a43a42; }
.student-outstanding-card.fee-upcoming .student-fee-status,
.student-outstanding-card.fee-outstanding .student-fee-status { color: #8a5b17; }

.student-home-section { margin-top: 34px; }
.student-home-section-others { margin-top: 30px; }
.student-home-section-title { margin-bottom: 18px; }
.student-home-section-title h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}
.student-home-action-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px 10px;
}
.student-home-action {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    text-align: center;
    color: #171a1e;
    font-size: 11px;
    line-height: 1.25;
}
.student-home-action-icon {
    width: 58px;
    height: 58px;
    border-radius: 13px;
    display: grid;
    place-items: center;
}
.student-home-action-icon svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.action-pink { background: #fbe8ec; color: #e14466; }
.action-purple { background: #f1e9fb; color: #8c4ed7; }
.action-yellow { background: #fff4d9; color: #d79b0c; }
.action-peach { background: #fcebe4; color: #eb6b42; }
.action-mint { background: #e7f4ef; color: #249b74; }
.action-blue { background: #e8effd; color: #4c79d4; }
.action-lilac { background: #f2eafb; color: #8d59cf; }
.action-sky { background: #e5f4fb; color: #1fa0c7; }
.action-cream { background: #fff3d9; color: #d49b18; }
.action-aqua { background: #e4f3f1; color: #359b8d; }
.action-handbook{ background:#fff2cc; color:#c48a00; }
.student-desktop-info-card { display: none; }

.student-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    background: rgba(255,255,255,.98);
    border-top: 1px solid var(--student-line);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 8px 3px max(8px, env(safe-area-inset-bottom));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.student-bottom-nav a {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #89909a;
    font-size: 9px;
    font-weight: 700;
}
.student-bottom-nav a svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.student-bottom-nav a.active { color: var(--student-blue); }
.student-bottom-nav a.active::before {
    content: '';
    position: absolute;
    top: -9px;
    width: 46px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--student-red);
}

@media (max-width: 390px) {
    .student-hero { padding-left: 15px; padding-right: 15px; min-height: 244px; }
    .student-hero-brand { gap: 12px; }
    .student-hero-logo-wrap { width: 76px; height: 76px; flex-basis: 76px; }
    .student-hero-copy h1 { font-size: 18px; }
    .student-home-main { padding-left: 13px; padding-right: 13px; }
    .student-home-action-grid { gap-left: 7px; gap-right: 7px; }
    .student-home-action-icon { width: 54px; height: 54px; }
}

@media (min-width: 760px) {
    .student-app-body { padding-bottom: 30px; }
    .student-hero { min-height: 280px; padding: 34px 28px 88px; }
    .student-hero-logo-wrap { width: 98px; height: 98px; flex-basis: 98px; }
    .student-hero-copy h1 { font-size: 28px; }
    .student-home-main { margin-top: -62px; padding-left: 28px; padding-right: 28px; }
    .student-quick-panel { max-width: 760px; min-height: 116px; }
    .student-home-desktop-grid {
        display: grid;
        grid-template-columns: minmax(0, 1.5fr) minmax(290px, .7fr);
        gap: 28px;
        align-items: start;
    }
    .student-outstanding-card { padding: 24px 26px; }
    .student-home-action-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px 16px; }
    .student-home-section-others .student-home-action-grid { grid-template-columns: repeat(4, minmax(0, 120px)); justify-content: start; }
    .student-desktop-info-card {
        display: block;
        background: #fff;
        border-radius: 18px;
        padding: 22px;
        box-shadow: var(--student-shadow);
        position: sticky;
        top: 22px;
    }
    .student-desktop-info-card h2 { margin: 7px 0 18px; font-size: 19px; line-height: 1.35; }
    .student-desktop-info-card dl { margin: 0; }
    .student-desktop-info-card dl div {
        display: grid;
        grid-template-columns: 110px minmax(0, 1fr);
        gap: 12px;
        padding: 11px 0;
        border-top: 1px solid var(--student-line);
    }
    .student-desktop-info-card dt { color: var(--student-muted); font-size: 12px; }
    .student-desktop-info-card dd { margin: 0; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
    .student-info-status { color: #16743c; }
    .student-bottom-nav { display: none; }
}

@media (min-width: 1080px) {
    .student-home-section-title h2 { font-size: 19px; }
    .student-home-action { font-size: 12px; }
}

/* =========================================================
   V4.2 - GAMBAR PROFIL PELAJAR
   Gambar profil bebas ditukar; berasingan daripada gambar rasmi Kad Matrik.
   ========================================================= */
.student-hero-profile-wrap {
    width: 88px;
    height: 88px;
    flex: 0 0 88px;
    box-sizing: border-box;
    position: relative;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
    padding: 4px;
    box-shadow: 0 10px 26px rgba(0,0,0,.10);
    overflow: visible;
}
.student-hero-profile-photo,
.student-hero-profile-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}
.student-hero-profile-photo {
    display: block;

    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;

    object-fit: cover;
    object-position: center center;

    border-radius: 50%;
    clip-path: circle(50% at 50% 50%);

    background: #eef3fa;
}
.student-hero-profile-fallback {
    display: grid;
    place-items: center;
    background: #eef4ff;
    color: var(--student-blue);
    font-size: 30px;
    font-weight: 800;
}
.student-profile-edit-badge {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff;
    color: var(--student-blue);
    border: 2px solid #fff;
    box-shadow: 0 5px 14px rgba(0,0,0,.18);
}
.student-profile-edit-badge svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.student-profile-page-main {
    width: min(100%, 680px);
    margin: -54px auto 0;
    padding: 0 16px 34px;
}
.student-profile-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: var(--student-shadow);
    padding: 22px 18px;
}
.student-profile-card h2 {
    margin: 0 0 7px;
    font-size: 19px;
}
.student-profile-card-copy {
    margin: 0 0 20px;
    color: var(--student-muted);
    font-size: 13px;
    line-height: 1.5;
}
.student-profile-preview-wrap {
    display: grid;
    place-items: center;
    margin: 10px 0 22px;
}
.student-profile-preview {
    width: 138px;
    height: 138px;
    border-radius: 50%;
    border: 5px solid #fff;
    box-shadow: 0 10px 30px rgba(17,36,61,.13);
    overflow: hidden;
    background: #eef4ff;
}
.student-profile-preview img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.student-profile-preview span {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--student-blue);
    font-size: 44px;
    font-weight: 800;
}
.student-profile-upload-form {
    display: grid;
    gap: 12px;
}
.student-file-control {
    border: 1px dashed #cbd3df;
    border-radius: 14px;
    padding: 16px;
    background: #fafbfc;
}
.student-file-control label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
}
.student-file-control input[type="file"] {
    width: 100%;
    font-size: 12px;
}
.student-profile-note {
    border-radius: 13px;
    padding: 12px 13px;
    background: #eef5ff;
    color: #365879;
    font-size: 12px;
    line-height: 1.5;
}
.student-profile-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 4px;
}
.student-secondary-button {
    min-height: 50px;
    border: 1px solid #d8dee8;
    border-radius: 14px;
    background: #fff;
    color: #30343a;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 13px;
}
.student-profile-success {
    background: #eaf7ef;
    color: #217143;
}

@media (max-width: 390px) {
    .student-hero-profile-wrap { width: 76px; height: 76px; flex-basis: 76px; }
    .student-profile-edit-badge { width: 26px; height: 26px; }
}
@media (min-width: 760px) {
    .student-hero-profile-wrap { width: 98px; height: 98px; flex-basis: 98px; }
    .student-profile-page-main { margin-top: -62px; padding-left: 28px; padding-right: 28px; }
    .student-profile-card { padding: 28px; }
    .student-profile-actions { grid-template-columns: 1fr 1fr; }
}

/* =========================================================
   PORTAL PELAJAR V5.0
   LOGO RESPONSIF + SIDEBAR PREMIUM
   Satu CSS sahaja: page_student_main.css
   ========================================================= */

/* ---------- PHONE: HEADER PUTIH + LOGO TENGAH ---------- */

.student-mobile-topbar {
    min-height: 72px;
    padding: 10px 18px;
    background: #ffffff;
    border-bottom: 1px solid var(--student-line);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 40;
}

.student-mobile-topbar-logo {
    display: block;
    width: 205px;
    max-width: 68vw;
    height: auto;
    object-fit: contain;
}

/* Sidebar tidak muncul pada telefon */
.student-desktop-sidebar {
    display: none;
}

.student-desktop-content {
    min-width: 0;
}

/* ---------- TABLET + DESKTOP ---------- */

@media (min-width: 760px) {

    .student-mobile-topbar {
        display: none;
    }

    .student-app-body {
        padding-bottom: 0;
        background: #f3f6fa;
    }

    .student-desktop-shell {
        min-height: 100vh;
        background: #f3f6fa;
    }

    .student-desktop-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 100;

        width: 250px;
        padding: 20px 15px;

        display: flex;
        flex-direction: column;
        overflow-y: auto;

        color: #ffffff;
        background:
            radial-gradient(circle at 18% 6%, rgba(255,255,255,.10), transparent 27%),
            linear-gradient(180deg, #073e78 0%, #062e5a 100%);

        box-shadow: 12px 0 36px rgba(11, 47, 91, .12);
    }

    .student-sidebar-brand {
        min-height: 76px;
        margin-bottom: 18px;
        padding: 12px 14px;

        display: flex;
        align-items: center;
        justify-content: center;

        background: #ffffff;
        border-radius: 18px;
        box-shadow: 0 12px 28px rgba(0,0,0,.13);
    }

    .student-sidebar-brand-logo {
        display: block;
        width: 178px;
        max-width: 100%;
        height: auto;
        object-fit: contain;
    }

    .student-sidebar-profile {
        display: grid;
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 12px;
        align-items: center;

        padding: 14px 7px 19px;
        margin-bottom: 10px;

        border-bottom: 1px solid rgba(255,255,255,.13);
    }

    .student-sidebar-photo {
        width: 58px;
        height: 58px;
        display: block;
        object-fit: cover;

        border: 3px solid rgba(255,255,255,.86);
        border-radius: 18px;
        background: #ffffff;
    }

    .student-sidebar-profile-copy {
        min-width: 0;
    }

    .student-sidebar-profile-copy strong {
        display: block;
        font-size: 12px;
        line-height: 1.3;
        font-weight: 800;
        overflow-wrap: anywhere;
    }

    .student-sidebar-profile-copy span {
        display: block;
        margin-top: 4px;
        font-size: 10px;
        font-weight: 700;
        color: rgba(255,255,255,.83);
    }

    .student-sidebar-profile-copy small {
        display: block;
        margin-top: 4px;
        font-size: 9px;
        line-height: 1.35;
        color: rgba(255,255,255,.58);
    }

    .student-sidebar-label {
        margin: 3px 9px 9px;
        color: rgba(255,255,255,.43);
        font-size: 9px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .09em;
    }

    .student-sidebar-menu {
        display: grid;
        gap: 5px;
    }

    .student-sidebar-menu a {
        min-height: 47px;
        padding: 0 13px;

        display: flex;
        align-items: center;
        gap: 12px;

        border-radius: 13px;

        color: rgba(255,255,255,.76);
        font-size: 12px;
        font-weight: 700;

        transition:
            background .18s ease,
            color .18s ease,
            transform .18s ease;
    }

    .student-sidebar-menu a:hover {
        background: rgba(255,255,255,.08);
        color: #ffffff;
        transform: translateX(2px);
    }

    .student-sidebar-menu a.active {
        color: var(--student-blue-dark);
        background: #ffffff;
        box-shadow: 0 9px 22px rgba(0,0,0,.13);
    }

    .student-sidebar-menu a[aria-disabled="true"] {
        cursor: default;
    }

    .student-sidebar-menu svg {
        width: 20px;
        height: 20px;
        flex: 0 0 20px;

        fill: none;
        stroke: currentColor;
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .student-sidebar-logout {
        min-height: 44px;
        margin-top: auto;

        display: flex;
        align-items: center;
        justify-content: center;

        border: 1px solid rgba(255,255,255,.20);
        border-radius: 13px;

        color: #ffffff;
        background: rgba(255,255,255,.04);

        font-size: 11px;
        font-weight: 800;
    }

    .student-sidebar-logout:hover {
        background: rgba(255,255,255,.09);
    }

    .student-desktop-content {
        min-height: 100vh;
        margin-left: 250px;
        padding: 22px;
    }

    /* Hero kanan, bukan full-screen */
    .student-desktop-content .student-hero {
        min-height: 270px;
        border-radius: 26px;
        overflow: hidden;
        box-shadow: 0 20px 46px rgba(20, 50, 85, .14);
    }

    .student-desktop-content .student-hero-inner {
        width: 100%;
    }

    .student-desktop-content .student-hero-logout {
        display: none;
    }

    .student-desktop-content .student-home-main {
        width: 100%;
        max-width: none;
        margin-top: -62px;
        padding-left: 18px;
        padding-right: 18px;
    }

    .student-desktop-content .student-quick-panel {
        width: 100%;
        max-width: none;
        border-radius: 20px;
    }

    .student-bottom-nav {
        display: none !important;
    }
}

/* ---------- DESKTOP BESAR ---------- */

@media (min-width: 1100px) {

    .student-desktop-sidebar {
        width: 280px;
        padding: 24px 18px;
    }

    .student-desktop-content {
        margin-left: 280px;
        padding: 26px;
    }

    .student-sidebar-brand {
        min-height: 82px;
    }

    .student-sidebar-brand-logo {
        width: 195px;
    }

    .student-sidebar-profile {
        grid-template-columns: 62px minmax(0, 1fr);
    }

    .student-sidebar-photo {
        width: 62px;
        height: 62px;
    }

    .student-sidebar-profile-copy strong {
        font-size: 13px;
    }

    .student-sidebar-menu a {
        min-height: 49px;
        font-size: 13px;
    }

    .student-desktop-content .student-hero {
        min-height: 290px;
    }
}

/* ---------- TELEFON KECIL ---------- */

@media (max-width: 390px) {

    .student-mobile-topbar {
        min-height: 68px;
    }

    .student-mobile-topbar-logo {
        width: 185px;
        max-width: 70vw;
    }
}


/* =========================================================
   KAWALAN KEBENARAN GAMBAR PROFIL PELAJAR
   ========================================================= */
.student-profile-locked-inline {
    display: grid;
    gap: 8px;
    margin-top: 8px;
    padding: 15px;
    border: 1px solid #fecaca;
    border-radius: 14px;
    background: #fff7f7;
    color: #8f1d25;
    text-align: center;
}
.student-profile-locked-inline strong {
    font-size: 14px;
}
.student-profile-locked-inline span {
    color: #7c4a4d;
    font-size: 12px;
    line-height: 1.45;
}
.student-profile-locked-inline .student-secondary-button {
    margin-top: 5px;
}

.student-profile-lock-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(7, 30, 58, .72);
    backdrop-filter: blur(5px);
}
.student-profile-lock-dialog {
    width: min(100%, 390px);
    padding: 28px 22px 22px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(7, 30, 58, .28);
    text-align: center;
}
.student-profile-lock-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 14px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    background: #fff0f0;
    color: #b4232a;
}
.student-profile-lock-icon svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.student-profile-lock-eyebrow {
    margin: 0 0 7px;
    color: #b4232a;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.student-profile-lock-dialog h2 {
    margin: 0 0 10px;
    color: #132b49;
    font-size: 21px;
    line-height: 1.2;
}
.student-profile-lock-dialog > p:not(.student-profile-lock-eyebrow) {
    margin: 0 0 18px;
    color: #66758a;
    font-size: 13px;
    line-height: 1.55;
}
.student-profile-lock-dialog .student-primary-button {
    width: 100%;
    min-height: 50px;
    display: grid;
    place-items: center;
    text-decoration: none;
}

/* =========================================================
   PORTAL PELAJAR V5.1 - PROFIL PELAJAR
   Profil Saya = maklumat pelajar, bukan halaman tukar gambar.
   ========================================================= */

.student-profile-overview-main {
    width: min(1180px, 100%);
    margin: -14px auto 0;
    padding: 0 16px 110px;
}

.student-profile-overview-alert {
    margin-bottom: 14px;
}

.student-profile-summary-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 18px;
    border: 1px solid #dce8f5;
    border-radius: 24px;
    background:
        radial-gradient(circle at 100% 0, rgba(24, 126, 219, .14), transparent 36%),
        linear-gradient(135deg, #ffffff 0%, #f5f9ff 100%);
    box-shadow: 0 16px 36px rgba(15, 61, 115, .09);
}

.student-profile-summary-photo-wrap {
    position: relative;
    width: 92px;
    height: 92px;
}

.student-profile-summary-photo {
    width: 92px;
    height: 92px;
    display: block;
    object-fit: cover;
    border: 4px solid #ffffff;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 61, 115, .16);
}

.student-profile-summary-camera {
    position: absolute;
    right: -7px;
    bottom: -7px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 3px solid #ffffff;
    border-radius: 50%;
    color: #ffffff;
    background: #0b5599;
    box-shadow: 0 7px 16px rgba(15, 61, 115, .22);
}

.student-profile-summary-camera svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.student-profile-summary-copy {
    min-width: 0;
}

.student-profile-summary-eyebrow,
.student-profile-section-kicker {
    margin: 0 0 5px;
    color: #0b65b5;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.student-profile-summary-copy h1 {
    margin: 0;
    color: #0f2e52;
    font-size: 20px;
    line-height: 1.15;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.student-profile-summary-meta {
    margin: 6px 0 0;
    color: #48627e;
    font-size: 11px;
    font-weight: 800;
}

.student-profile-summary-program {
    margin: 4px 0 0;
    color: #6a7b90;
    font-size: 11px;
    line-height: 1.35;
    font-weight: 700;
}

.student-profile-summary-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 11px;
}

.student-profile-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid #d9e8f7;
    border-radius: 999px;
    color: #0d4f88;
    background: #edf6ff;
    font-size: 9px;
    font-weight: 900;
}

.student-profile-chip.is-status {
    color: #087443;
    border-color: #c7efdb;
    background: #eafaf2;
}

.student-profile-photo-action {
    grid-column: 1 / -1;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    border: 1px solid #cfe2f5;
    border-radius: 13px;
    color: #0b5599;
    background: #ffffff;
    font-size: 11px;
    font-weight: 900;
}

.student-profile-section {
    margin-top: 14px;
    padding: 17px;
    border: 1px solid #dfe9f4;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 61, 115, .055);
}

.student-profile-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 13px;
}

.student-profile-section-head h2 {
    margin: 0;
    color: #16395f;
    font-size: 17px;
    line-height: 1.2;
    font-weight: 900;
}

.student-profile-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.student-profile-info-item {
    min-width: 0;
    min-height: 74px;
    padding: 11px 12px;
    border: 1px solid #e3edf7;
    border-radius: 15px;
    background: #f8fbff;
}

.student-profile-info-item.is-wide {
    grid-column: 1 / -1;
}

.student-profile-info-item span,
.student-profile-guardian-details span,
.student-profile-guardian-head > div > span {
    display: block;
    margin-bottom: 5px;
    color: #7a8ba0;
    font-size: 9px;
    line-height: 1.25;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .035em;
}

.student-profile-info-item strong,
.student-profile-guardian-details strong {
    display: block;
    color: #172c45;
    font-size: 11px;
    line-height: 1.42;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.student-profile-break {
    word-break: break-word;
}

.student-profile-guardian-grid {
    display: grid;
    gap: 11px;
}

.student-profile-guardian-card {
    padding: 14px;
    border: 1px solid #e0eaf5;
    border-radius: 17px;
    background: #f9fbfe;
}

.student-profile-guardian-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 11px;
    margin-bottom: 11px;
    border-bottom: 1px solid #e2eaf3;
}

.student-profile-guardian-head h3 {
    margin: 0;
    color: #173758;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.student-profile-relation-badge {
    flex: 0 0 auto;
    padding: 6px 9px;
    border-radius: 999px;
    color: #71521a;
    background: #fff5d8;
    font-size: 9px;
    font-weight: 900;
}

.student-profile-guardian-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.student-profile-guardian-details > div {
    min-width: 0;
}

.student-profile-guardian-details .is-wide {
    grid-column: 1 / -1;
}

.student-profile-empty-state,
.student-profile-record-note {
    padding: 14px;
    border-radius: 15px;
    color: #60758d;
    background: #f5f9fd;
    font-size: 10px;
    line-height: 1.55;
    font-weight: 700;
}

.student-profile-record-note {
    margin-top: 14px;
    border: 1px solid #d8e7f5;
    background: #edf6ff;
}

@media (max-width: 759px) {
    .student-profile-overview-main {
        margin-top: -14px;
        padding-top: 0;
    }

    .student-profile-overview-body .student-mobile-topbar {
        position: sticky;
        top: 0;
    }
}

@media (min-width: 760px) {
    .student-profile-overview-main {
        padding: 0 0 42px;
    }

    .student-profile-summary-card {
        grid-template-columns: 118px minmax(0, 1fr) auto;
        gap: 22px;
        padding: 24px;
        border-radius: 26px;
    }

    .student-profile-summary-photo-wrap,
    .student-profile-summary-photo {
        width: 118px;
        height: 118px;
    }

    .student-profile-summary-photo {
        border-radius: 30px;
    }

    .student-profile-summary-copy h1 {
        font-size: 26px;
    }

    .student-profile-summary-meta,
    .student-profile-summary-program {
        font-size: 12px;
    }

    .student-profile-photo-action {
        grid-column: auto;
        min-width: 160px;
        padding: 0 18px;
    }

    .student-profile-section {
        padding: 22px;
    }

    .student-profile-info-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 11px;
    }

    .student-profile-info-item.is-wide {
        grid-column: span 2;
    }

    .student-profile-info-item {
        min-height: 82px;
        padding: 13px 14px;
    }

    .student-profile-info-item strong,
    .student-profile-guardian-details strong {
        font-size: 12px;
    }

    .student-profile-guardian-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* =========================================================
   V5.1 - DASHBOARD PPT: MENU PADAT + AKTIVITI KTAC
   Hanya aktif pada body .student-home-ppt.
   ========================================================= */
.student-home-ppt .student-ppt-menu-section {
    margin-top: 28px;
}

.student-home-ppt .student-ppt-action-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 26px 10px;
    align-items: start;
}

.student-home-ppt .student-ppt-action-grid .student-home-action {
    grid-column: span 2;
    font-size: 13px;
    font-weight: 500;
}

.student-home-ppt .student-ppt-action-grid .student-home-action:nth-child(4),
.student-home-ppt .student-ppt-action-grid .student-home-action:nth-child(5) {
    grid-column: span 3;
}

.student-home-ppt .student-ppt-action-grid .student-home-action-icon {
    width: 76px;
    height: 76px;
    border-radius: 18px;
}

.student-home-ppt .student-ppt-action-grid .student-home-action-icon svg {
    width: 34px;
    height: 34px;
}

/* ---------- Aktiviti KTAC ---------- */
.ppt-activity-showcase {
    margin-top: 36px;
    padding: 0 0 6px;
    min-width: 0;
}

.ppt-activity-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.ppt-activity-kicker {
    margin: 0 0 4px;
    color: #e11d48;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.ppt-activity-head h2 {
    margin: 0;
    color: #111827;
    font-size: 19px;
    line-height: 1.15;
}

.ppt-activity-all {
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 1px solid #dce8f5;
    border-radius: 999px;
    background: #fff;
    color: #0f4f87;
    font-size: 10px;
    font-weight: 750;
    box-shadow: 0 5px 14px rgba(15,79,135,.06);
}

.ppt-activity-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(230px, 82%);
    gap: 13px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 2px 16px 14px 0;
}

.ppt-activity-rail::-webkit-scrollbar {
    display: none;
}

.ppt-activity-card {
    min-width: 0;
    overflow: hidden;
    scroll-snap-align: start;
    border: 1px solid #e2ebf4;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(18,52,84,.09);
}

.ppt-activity-card > a {
    display: block;
    color: inherit;
}

.ppt-activity-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #eaf2f9;
}

.ppt-activity-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.ppt-activity-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg,#0d4076,#1f7bc3);
    color: #fff;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: .06em;
}

.ppt-activity-count {
    position: absolute;
    right: 9px;
    bottom: 9px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(4,25,48,.76);
    color: #fff;
    font-size: 9px;
    font-weight: 750;
    backdrop-filter: blur(5px);
}

.ppt-activity-body {
    padding: 12px 13px 14px;
}

.ppt-activity-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
    color: #6b7280;
    font-size: 9px;
    line-height: 1.25;
}

.ppt-activity-meta span {
    color: #d91f4d;
    font-weight: 800;
    text-transform: uppercase;
}

.ppt-activity-meta time {
    text-align: right;
}

.ppt-activity-body h3 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    margin: 0;
    color: #172033;
    font-size: 13px;
    line-height: 1.35;
}

@media (max-width: 390px) {
    .student-home-ppt .student-ppt-action-grid {
        gap: 24px 8px;
    }

    .student-home-ppt .student-ppt-action-grid .student-home-action-icon {
        width: 70px;
        height: 70px;
    }

    .student-home-ppt .student-ppt-action-grid .student-home-action-icon svg {
        width: 31px;
        height: 31px;
    }

    .ppt-activity-rail {
        grid-auto-columns: minmax(218px, 86%);
    }
}

@media (min-width: 760px) {
    .student-home-ppt .student-ppt-menu-section {
        margin-top: 32px;
    }

    .student-home-ppt .student-ppt-action-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 18px;
    }

    .student-home-ppt .student-ppt-action-grid .student-home-action,
    .student-home-ppt .student-ppt-action-grid .student-home-action:nth-child(4),
    .student-home-ppt .student-ppt-action-grid .student-home-action:nth-child(5) {
        grid-column: auto;
    }

    .student-home-ppt .student-ppt-action-grid .student-home-action-icon {
        width: 72px;
        height: 72px;
    }

    .ppt-activity-showcase {
        margin-top: 40px;
    }

    .ppt-activity-head h2 {
        font-size: 21px;
    }

    .ppt-activity-rail {
        grid-auto-columns: minmax(240px, 31%);
        gap: 16px;
        padding-right: 22px;
    }
}

/* =========================================================
   V5.2 - PORTAL PELAJAR: AKTIVITI PPT DALAM PORTAL
   - HP: tepat 2 kad aktiviti kelihatan serentak
   - Detail kekal dalam Portal Pelajar
   - Galeri detail tidak stretch/crop gambar
========================================================= */

@media (max-width: 759px) {
    .student-home-ppt .ppt-activity-rail {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: calc((100% - 10px) / 2);
        gap: 10px;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 2px 0 14px;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .student-home-ppt .ppt-activity-rail::-webkit-scrollbar {
        display: none;
    }

    .student-home-ppt .ppt-activity-card {
        width: 100%;
        min-width: 0;
        scroll-snap-align: start;
        border-radius: 16px;
    }

    .student-home-ppt .ppt-activity-media {
        aspect-ratio: 4 / 3;
    }

    .student-home-ppt .ppt-activity-body {
        padding: 9px 9px 11px;
    }

    .student-home-ppt .ppt-activity-meta {
        display: block;
        margin-bottom: 5px;
        font-size: 7.8px;
    }

    .student-home-ppt .ppt-activity-meta time {
        display: block;
        margin-top: 3px;
        text-align: left;
    }

    .student-home-ppt .ppt-activity-body h3 {
        font-size: 10.5px;
        line-height: 1.3;
        -webkit-line-clamp: 3;
    }

    .student-home-ppt .ppt-activity-count {
        right: 6px;
        bottom: 6px;
        padding: 4px 6px;
        font-size: 7.5px;
    }
}

/* ---------- Aktiviti: page senarai ---------- */
.student-activity-page-main,
.student-activity-detail-main {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 24px;
}

.student-activity-page-head,
.student-activity-detail-head {
    margin-bottom: 22px;
}

.student-activity-page-head > p {
    margin: 14px 0 4px;
    color: #e11d48;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .12em;
}

.student-activity-page-head h1,
.student-activity-detail-head h1 {
    margin: 0;
    color: #111827;
    line-height: 1.15;
}

.student-activity-page-head h1 { font-size: clamp(25px, 4vw, 38px); }
.student-activity-detail-head h1 { font-size: clamp(24px, 4vw, 36px); }

.student-activity-page-head > span,
.student-activity-detail-head > p {
    display: block;
    margin: 8px 0 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.55;
}

.student-activity-back {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid #dbe7f3;
    border-radius: 12px;
    background: #fff;
    color: #0f4f87;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 5px 14px rgba(15,79,135,.06);
}

.student-activity-list-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.student-activity-list-card {
    overflow: hidden;
    border: 1px solid #e1eaf3;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(18,52,84,.08);
}

.student-activity-list-card > a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.student-activity-list-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #edf3f8;
}

.student-activity-list-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.student-activity-list-media > span {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(8,31,54,.78);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
}

.student-activity-list-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg,#0d4076,#1f7bc3);
    font-size: 24px;
    font-weight: 900;
}

.student-activity-list-body { padding: 14px 15px 16px; }
.student-activity-list-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: #64748b;
    font-size: 10px;
}
.student-activity-list-meta b { color: #dc1f4d; text-transform: uppercase; }
.student-activity-list-card h2 {
    margin: 8px 0 0;
    color: #172033;
    font-size: 15px;
    line-height: 1.35;
}

.student-activity-empty,
.student-activity-not-found {
    padding: 26px;
    border: 1px solid #e1eaf3;
    border-radius: 20px;
    background: #fff;
}

/* ---------- Aktiviti: detail ---------- */
.student-activity-detail-card {
    overflow: hidden;
    border: 1px solid #e1eaf3;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(18,52,84,.08);
}

.student-activity-detail-head { padding: 24px 26px 8px; }
.student-activity-detail-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 8px;
    color: #64748b;
    font-size: 11px;
}
.student-activity-detail-meta span {
    padding: 5px 9px;
    border-radius: 999px;
    background: #fce7ef;
    color: #be123c;
    font-weight: 850;
    text-transform: uppercase;
}

.student-activity-gallery { padding: 10px 26px 4px; }
.student-activity-gallery-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.student-activity-gallery-rail::-webkit-scrollbar { display:none; }
.student-activity-gallery-item {
    min-width: 0;
    margin: 0;
    scroll-snap-align: start;
}
.student-activity-gallery-image-wrap {
    display: grid;
    place-items: center;
    min-height: 220px;
    max-height: 620px;
    overflow: hidden;
    border-radius: 18px;
    background: #eef3f8;
}
.student-activity-gallery-image-wrap img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 620px;
    object-fit: contain;
    object-position: center;
}
.student-activity-gallery-item figcaption {
    padding: 8px 4px 0;
    color: #64748b;
    font-size: 11px;
    line-height: 1.4;
}
.student-activity-gallery-hint {
    padding: 8px 2px 0;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    text-align: right;
}

.student-activity-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, .7fr);
    gap: 22px;
    padding: 22px 26px 28px;
}
.student-activity-detail-content p {
    margin: 0 0 13px;
    color: #334155;
    font-size: 14px;
    line-height: 1.7;
}
.student-activity-facts {
    align-self: start;
    padding: 18px;
    border-radius: 18px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
}
.student-activity-facts h2 { margin:0 0 12px; font-size:15px; color:#0f3d73; }
.student-activity-facts dl { margin:0; }
.student-activity-facts dl div {
    display:grid;
    grid-template-columns:78px minmax(0,1fr);
    gap:10px;
    padding:9px 0;
    border-top:1px solid #e2e8f0;
}
.student-activity-facts dt { color:#64748b; font-size:11px; }
.student-activity-facts dd { margin:0; color:#172033; font-size:11px; font-weight:800; }

@media (max-width: 759px) {
    .student-activity-page-main,
    .student-activity-detail-main {
        padding: 14px 14px 92px;
    }

    .student-activity-page-head { margin-bottom: 16px; }
    .student-activity-page-head h1 { font-size: 25px; }
    .student-activity-page-head > span { font-size: 12px; }

    .student-activity-list-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .student-activity-list-card { border-radius: 16px; }
    .student-activity-list-body { padding: 9px 9px 11px; }
    .student-activity-list-meta { display:block; font-size:8px; }
    .student-activity-list-meta time { display:block; margin-top:3px; }
    .student-activity-list-card h2 { font-size: 11px; line-height:1.3; }
    .student-activity-list-media > span { right:6px; bottom:6px; padding:4px 6px; font-size:8px; }

    .student-activity-detail-card {
        border-radius: 18px;
        box-shadow: none;
    }
    .student-activity-detail-head { padding: 16px 15px 6px; }
    .student-activity-detail-head h1 { font-size: 22px; }
    .student-activity-detail-head > p { font-size: 12px; }
    .student-activity-detail-meta { margin-top: 14px; font-size: 9px; }

    .student-activity-gallery { padding: 9px 10px 0; }
    .student-activity-gallery-image-wrap {
        min-height: 190px;
        max-height: 54vh;
        border-radius: 14px;
    }
    .student-activity-gallery-image-wrap img {
        width: auto;
        max-width: 100%;
        height: auto;
        max-height: 54vh;
    }

    .student-activity-detail-layout {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 16px 15px 20px;
    }
    .student-activity-detail-content p { font-size: 12px; line-height: 1.65; }
    .student-activity-facts { padding: 14px; border-radius: 15px; }
}

/* =========================================================
   PORTAL PELAJAR - SHARED HEADER / FOOTER 2026-09-16
   ========================================================= */
.student-shared-header .student-quick-item.is-active{
    color:var(--student-blue);
}
.student-shared-header .student-quick-item.is-active svg{
    stroke:currentColor;
}
.student-shared-quick-wrap{
    position:relative;
    z-index:5;
}
@media print{
    .student-shared-header,
    .student-shared-footer,
    .no-print{
        display:none !important;
    }
}

@media screen and (max-width: 759px) {
    body.student-profile-overview-body
    main.student-profile-overview-main {
        margin-top: -14px !important;
        padding-top: 0 !important;
    }

    body.student-profile-overview-body
    main.student-profile-overview-main > .student-profile-section:first-of-type {
        margin-top: 0 !important;
    }
}

@media screen and (max-width: 759px) {
    body.student-page-utama
    .student-desktop-content > main.student-home-main {
        margin-top: -14px !important;
    }

    body.student-page-utama
    .student-home-desktop-grid {
        margin-top: 0 !important;
    }
}

/* =========================================================
   BUKU PANDUAN PELAJAR - PAPARAN HP
   Tidak mengganggu paparan Buku Panduan sistem staf
========================================================= */

@media (max-width: 759px) {

    .student-handbook-page main {
        padding: 10px !important;
    }

    .student-handbook-page .handbook-toolbar {
        display: grid !important;
        grid-template-columns: 48px minmax(0, 1fr) 48px !important;
        grid-template-areas:
            "prev page next"
            "search search search" !important;
        gap: 10px !important;

        width: 100% !important;
        margin: 0 0 12px !important;
        padding: 10px !important;

        background: #f7f9fc !important;
        border: 1px solid #e0e7f0 !important;
        border-radius: 16px !important;
        box-sizing: border-box !important;
    }

    /* BUTANG SEBELUM */
    .student-handbook-page #previousPage {
        grid-area: prev !important;
    }

    /* BUTANG SETERUSNYA */
    .student-handbook-page #nextPage {
        grid-area: next !important;
    }

    .student-handbook-page .book-nav {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;

        margin: 0 !important;
        padding: 0 !important;

        display: grid !important;
        place-items: center !important;

        border: 0 !important;
        border-radius: 14px !important;

        background: #0b4d8f !important;
        color: #ffffff !important;

        font-size: 24px !important;
        line-height: 1 !important;

        box-shadow: 0 6px 16px rgba(11, 77, 143, .18) !important;
    }

    /* NOMBOR HALAMAN */
    .student-handbook-page .book-page-number {
        grid-area: page !important;

        min-width: 0 !important;
        min-height: 48px !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 7px !important;

        padding: 0 10px !important;

        background: #ffffff !important;
        border: 1px solid #dbe4ef !important;
        border-radius: 14px !important;

        color: #64748b !important;
        font-size: 12px !important;
        white-space: nowrap !important;
    }

    .student-handbook-page .book-page-number input {
        width: 44px !important;
        min-width: 44px !important;
        height: 32px !important;

        padding: 0 !important;

        border: 0 !important;
        border-bottom: 1px solid #cbd5e1 !important;
        border-radius: 0 !important;

        background: transparent !important;

        color: #0b3f78 !important;
        font-size: 15px !important;
        font-weight: 800 !important;
        text-align: center !important;
    }

    .student-handbook-page .book-page-number strong {
        color: #334155 !important;
        font-weight: 800 !important;
    }

    /* CARIAN */
    .student-handbook-page .book-search {
        grid-area: search !important;

        width: 100% !important;
        min-height: 48px !important;

        display: flex !important;
        align-items: center !important;
        gap: 9px !important;

        padding: 0 14px !important;

        background: #ffffff !important;
        border: 1px solid #dbe4ef !important;
        border-radius: 14px !important;

        box-sizing: border-box !important;
    }

    .student-handbook-page .book-search > span {
        flex: 0 0 auto !important;
        font-size: 17px !important;
    }

    .student-handbook-page .book-search input {
        width: 100% !important;
        min-width: 0 !important;
        height: 44px !important;

        padding: 0 !important;

        border: 0 !important;
        outline: 0 !important;
        background: transparent !important;

        font-size: 14px !important;
    }

    .student-handbook-page .book-search input::placeholder {
        color: #8b95a3 !important;
    }

}

/* =========================================================
   BUKU PANDUAN STAF DALAM PORTAL PELAJAR
========================================================= */

.student-handbook-embed {
    display: none;
}

.student-handbook-embed:target {
    position: fixed;

    top: 0;
    right: 0;
    bottom: 0;
    left: 280px;

    z-index: 300;

    display: flex;
    flex-direction: column;

    background: #f3f6fa;

    overflow: hidden;
}


/* ---------- BAR ATAS ---------- */

.student-handbook-embed-bar {
    flex: 0 0 64px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    padding: 0 22px;

    background: #ffffff;
    border-bottom: 1px solid #dce5ef;

    box-shadow: 0 4px 14px rgba(15, 50, 85, .06);
}

.student-handbook-embed-bar strong {
    color: #0b3f78;
    font-size: 17px;
    font-weight: 900;
}

.student-handbook-embed-close {
    padding: 10px 16px;

    border: 1px solid #d2dfec;
    border-radius: 12px;

    background: #ffffff;
    color: #0b5599;

    font-size: 12px;
    font-weight: 800;

    text-decoration: none;
}


/* ---------- IFRAME ---------- */

.student-handbook-embed iframe {
    display: block;

    width: 100%;
    height: 100%;

    flex: 1 1 auto;
    min-height: 0;

    border: 0;

    background: #f4f7fb;
}


/* ---------- DESKTOP SEDERHANA ---------- */

@media (min-width: 760px) and (max-width: 1099px) {

    .student-handbook-embed:target {
        left: 250px;
    }

}


/* ---------- TELEFON ---------- */

@media (max-width: 759px) {

    .student-handbook-embed:target {
        left: 0;
        top: 0;
        right: 0;
        bottom: 0;

        z-index: 999;
    }

    .student-handbook-embed-bar {
        flex-basis: 58px;
        padding: 0 14px;
    }

    .student-handbook-embed-bar strong {
        font-size: 14px;
    }

    .student-handbook-embed-close {
        padding: 9px 12px;
        font-size: 11px;
    }

}