/* ============================================================
   APP-SKAKM4T
   LOGIN CSS
   ============================================================

   BASELINE:
   - Tampilan desktop/laptop dipertahankan
   - Tampilan HP diperbaiki khusus mobile
   - Tidak mengubah PHP
   - Tidak mengubah database
   - Tidak mengubah login logic
   - Tidak mengubah struktur login.php
   - Mencegah horizontal scroll
   - INFO TERKINI tetap berjalan
   - Pengumuman hanya judul
   ============================================================ */

/* ============================================================
   RESET
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;

    overflow-x: hidden;
}

body {
    width: 100%;
    min-width: 0;
    min-height: 100vh;

    margin: 0;
    padding: 0;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    overflow-x: hidden;

    background: #ffffff;

    color: #ffffff;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */

.login-page {
    width: 100%;
    min-width: 0;
    min-height: 100vh;

    display: flex;
    flex-direction: column;

    overflow-x: hidden;
}

/* ============================================================
   TOP BAR
   DESKTOP BASELINE
   ============================================================ */

.login-topbar {
    position: relative;

    width: 100%;
    height: 66px;
    min-height: 66px;

    display: flex;
    align-items: stretch;

    background: #28d000;

    border-bottom:
        2px solid #ffffff;

    overflow: hidden;

    z-index: 20;
}

/* ============================================================
   INFO TERKINI
   KIRI
   ============================================================ */

.info-news {
    position: relative;

    flex: 0 0 218px;

    width: 218px;
    min-width: 218px;

    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 12px;

    padding:
        0 14px;

    background: #050505;

    color: #ffffff;

    border-right:
        2px solid #ffffff;

    z-index: 30;

    white-space: nowrap;

    overflow: hidden;
}

.news-icon {
    flex: 0 0 auto;

    width: auto;

    font-size: 24px;

    line-height: 1;

    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.news-title {
    flex: 0 0 auto;

    font-size: 19px;

    font-weight: 800;

    letter-spacing: .5px;

    white-space: nowrap;
}

/* ============================================================
   AREA TEKS BERJALAN
   ============================================================ */

.welcome-text {
    position: relative;

    flex: 1 1 auto;

    width:
        calc(100% - 218px);

    min-width: 0;

    height: 100%;

    display: flex;
    align-items: center;

    overflow: hidden;

    background: #28d000;

    color: #ffffff;

    z-index: 10;

    white-space: nowrap;
}

/* ============================================================
   TICKER
   ============================================================ */

.news-ticker {
    position: relative;

    width: 100%;
    height: 100%;

    min-width: 0;

    display: flex;
    align-items: center;

    overflow: hidden;

    white-space: nowrap;
}

/*
 * PENTING:
 *
 * Jangan beri:
 * max-width: 100%;
 * width: 100%;
 *
 * pada .news-ticker-track.
 *
 * Track harus mengikuti panjang isi
 * agar animasi dapat berjalan.
 */

.news-ticker-track {
    display: inline-flex;

    align-items: center;

    flex: 0 0 auto;

    width: max-content;

    min-width: max-content;

    height: 100%;

    white-space: nowrap;

    will-change: transform;

    animation:
        loginTicker
        35s
        linear
        infinite;
}

/* ============================================================
   ITEM TICKER
   ============================================================ */

.news-ticker-item {
    display: inline-flex;

    align-items: center;

    flex: 0 0 auto;

    width: max-content;

    min-width: max-content;

    height: 100%;

    padding:
        0 0 0 55px;

    margin-right: 220px;

    color: #ffffff;

    font-size: 17px;

    font-weight: 700;

    line-height: 1;

    white-space: nowrap;

    text-decoration: none;

    cursor: pointer;

    transition:
        color .2s ease,
        opacity .2s ease;
}

.news-ticker-item:hover {
    color: #ffffff;

    opacity: .9;

    text-decoration: underline;
}

.news-title-text {
    display: inline-block;

    white-space: nowrap;
}

/* ============================================================
   SELAMAT DATANG
   ============================================================ */

.news-item {
    display: inline-flex;

    align-items: center;

    flex: 0 0 auto;

    width: max-content;

    min-width: max-content;

    height: 100%;

    padding:
        0 0 0 55px;

    margin-right: 220px;

    color: #ffffff;

    font-size: 17px;

    font-weight: 700;

    line-height: 1;

    white-space: nowrap;
}

.news-date {
    display: inline-block;

    white-space: nowrap;
}

/* ============================================================
   SPACER AKHIR
   ============================================================ */

.ticker-end-spacer {
    width: 420px;

    min-width: 420px;

    margin-right: 0;

    padding: 0;

    visibility: hidden;
}

/* ============================================================
   ANIMASI TICKER
   ============================================================ */

@keyframes loginTicker {

    0% {
        transform:
            translateX(100vw);
    }

    100% {
        transform:
            translateX(-100%);
    }

}

/* ============================================================
   MAIN LOGIN
   ============================================================ */

.login-main {
    position: relative;

    width: 100%;

    flex: 1 1 auto;

    min-height: 570px;

    display: flex;

    align-items: center;
    justify-content: center;

    padding:
        70px 25px;

    background-image:
        url("../images/gedung_sbsn.png");

    background-size: cover;

    background-position:
        center center;

    background-repeat: no-repeat;

    overflow: hidden;
}

.login-status-outside {
    position: absolute;

    left: 50%;
    bottom: 18px;

    transform: translateX(-50%);

    width: min(
        805px,
        calc(100% - 32px)
    );

    box-sizing: border-box;

    text-align: center;

    z-index: 30;
}

/* ============================================================
   OVERLAY
   ============================================================ */

.login-overlay {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    background:
        rgba(0, 0, 0, .18);

    pointer-events: none;

    z-index: 1;
}

/* ============================================================
   LOGIN CARD
   DESKTOP BASELINE
   ============================================================ */

.login-card {
    position: relative;

    z-index: 5;

    width:
        min(748px, 92vw);

    padding:
        30px 30px 27px;

    background:
        rgba(17, 66, 9, .94);

    border-radius: 17px;

    box-shadow:
        0 0 15px
        rgba(72, 255, 0, .65),

        0 0 30px
        rgba(72, 255, 0, .35);

    border:
        1px solid
        rgba(112, 255, 60, .35);

    overflow: hidden;
}

/* ============================================================
   LOGIN HEADING
   ============================================================ */

.login-heading {
    width: 100%;

    text-align: center;

    margin-bottom: 27px;
}

.login-title {
    font-size: 29px;

    font-weight: 400;

    letter-spacing: 4px;

    line-height: 1.25;

    color: #ffffff;

    text-transform: uppercase;
}

.login-school {
    margin-top: 2px;

    font-size: 29px;

    font-weight: 400;

    letter-spacing: 4px;

    line-height: 1.25;

    color: #ffffff;

    text-transform: uppercase;
}

/* ============================================================
   LOGIN FORM
   ============================================================ */

.login-form {
    width: 100%;

    margin: 0;
    padding: 0;
}

/* ============================================================
   INPUT GROUP
   ============================================================ */

.login-input-group {
    position: relative;

    width: 100%;

    height: 54px;

    display: flex;

    margin-bottom: 13px;

    overflow: hidden;
}

/* ============================================================
   INPUT
   ============================================================ */

.login-input {
    width: 100%;
    height: 54px;

    padding:
        0 70px 0 20px;

    border:
        1px solid #dddddd;

    border-radius: 0;

    outline: none;

    background: #f8f8f8;

    color: #111111;

    font-size: 17px;

    line-height: 1;

    -webkit-appearance: none;
    appearance: none;
}

.login-input::placeholder {
    color: #888888;

    opacity: 1;
}

.login-input:focus {
    border-color: #3b9ed0;

    box-shadow:
        inset 0 0 0 1px
        rgba(59, 158, 208, .25);
}

/* ============================================================
   INPUT ICON
   ============================================================ */

.input-icon {
    position: absolute;

    top: 0;
    right: 0;

    width: 62px;
    height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;

    border-left:
        1px solid #dddddd;

    color: #555555;

    font-size: 24px;

    z-index: 3;
}

/* ============================================================
   TOGGLE PASSWORD
   ============================================================ */

.toggle-password {
    border: 0;

    background: #ffffff;

    color: #555555;

    cursor: pointer;
}

.toggle-password:hover {
    background: #f2f2f2;
}

/* ============================================================
   MESSAGE / ERROR
   ============================================================ */

.login-message {
    width: 100%;

    margin:
        10px 0;

    color: #ffffff;

    font-size: 15px;

    line-height: 1.5;

    text-align: center;
}

.login-message:not(:empty) {
    padding:
        8px 12px;

    border-radius: 8px;

    background:
        rgba(180, 0, 0, .35);

    color: #ffffff;
}

/* ============================================================
   LOGIN BUTTON
   ============================================================ */

.login-button {
    width: 100%;

    min-height: 56px;

    margin-top: 8px;

    padding:
        12px 20px;

    border: 0;

    border-radius: 4px;

    background: #4aa1cf;

    color: #ffffff;

    font-family:
        "Segoe UI",
        Arial,
        Helvetica,
        sans-serif;

    font-size: 22px;

    font-weight: 800;

    text-align: center;

    cursor: pointer;

    transition:
        background .2s ease,
        transform .15s ease,
        box-shadow .2s ease;
}

.login-button:hover {
    background: #3695c7;

    box-shadow:
        0 5px 15px
        rgba(0, 0, 0, .20);
}

.login-button:active {
    transform:
        translateY(1px);
}

.login-button:disabled {
    opacity: .70;

    cursor: wait;

    transform: none;
}

/* ============================================================
   LOGIN LOADING
   ELEGAN • PROPORSIONAL • RESPONSIVE
   ============================================================ */

.login-loading {
    display: none;

    align-items: center;
    justify-content: center;

    gap: 10px;

    width: 100%;
    height: 100%;

    color: #ffffff;

    font-size: 17px;
    font-weight: 700;

    line-height: 1;

    white-space: nowrap;
}

/* Spinner */

.login-loading::before {
    content: "";

    width: 20px;
    height: 20px;

    flex: 0 0 20px;

    border: 3px solid rgba(255, 255, 255, .30);

    border-top-color: #ffffff;

    border-radius: 50%;

    animation:
        loginSpinner
        .75s
        linear
        infinite;
}

/* Teks tombol disembunyikan saat loading */

.login-button.loading .login-button-text {
    display: none;
}

/* Loading ditampilkan saat tombol aktif */

.login-button.loading .login-loading {
    display: flex;
}

/* Animasi spinner */

@keyframes loginSpinner {

    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }

}

/* ============================================================
   LOGIN LINKS
   ============================================================ */

.login-links {
    width: 100%;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin-top: 16px;
}

.login-links a {
    color: #ffffff;

    font-size: 18px;

    font-weight: 700;

    text-decoration: none;

    transition:
        color .2s ease;
}

.login-links a:hover {
    color: #d7ffd0;

    text-decoration: underline;
}

/* ============================================================
   BACK BUTTON
   ============================================================ */

.login-back {
    text-align: left;
}

/* ============================================================
   FORGOT PASSWORD
   ============================================================ */

.login-forgot {
    text-align: right;
}

/* ============================================================
   SECURE NOTE
   ============================================================ */

.secure-note {
    margin:
        12px 0 0;

    color:
        rgba(255, 255, 255, .90);

    text-align: center;

    font-size: 15px;

    line-height: 1.5;
}

/* ============================================================
   LEGACY FIELD SUPPORT
   ============================================================ */

.field {
    width: 100%;

    margin-bottom: 16px;
}

.field label {
    display: block;

    margin-bottom: 7px;

    color: #ffffff;

    font-size: 16px;

    font-weight: 700;
}

.input-wrap {
    position: relative;

    width: 100%;

    display: flex;

    align-items: stretch;
}

.input-wrap input {
    flex: 1;

    min-width: 0;

    width: 100%;

    min-height: 54px;

    padding:
        12px 15px;

    border: 0;

    outline: none;

    font-size: 17px;
}

.input-wrap .toggle-password {
    flex:
        0 0 55px;

    border: 0;

    cursor: pointer;
}

/* ============================================================
   LEGACY SUBMIT
   ============================================================ */

.submit {
    width: 100%;

    min-height: 55px;

    border: 0;

    border-radius: 4px;

    background: #4aa1cf;

    color: #ffffff;

    font-size: 20px;

    font-weight: 800;

    cursor: pointer;
}

/* ============================================================
   FIX TICKER DESKTOP
   Struktur aktual login.php menggunakan .news-track
   ============================================================ */

.login-topbar .news-track {

    display: inline-flex;

    align-items: center;

    flex: 0 0 auto;

    width: max-content;

    min-width: max-content;

    height: 100%;

    white-space: nowrap;

    will-change: transform;

    animation:
        loginTicker
        35s
        linear
        infinite;
}

.login-topbar .login-ticker-welcome {

    display: inline-flex;

    align-items: center;

    flex: 0 0 auto;

    width: max-content;

    min-width: max-content;

    height: 100%;

    white-space: nowrap;

}

.login-topbar .login-ticker-separator {

    flex: 0 0 auto;

    margin-left: 10px;
    margin-right: 10px;

    white-space: nowrap;
}

.login-topbar .login-ticker-announcement {

    flex: 0 0 auto;

    width: max-content;

    white-space: nowrap;

    color: #ffffff;

    text-decoration: none;

}

.login-topbar .login-ticker-loop-space {

    display: inline-block;

    flex: 0 0 auto;

    width: 420px;

    min-width: 420px;

    height: 1px;

}

/* RESPONSIF TERPADU */

    body.login-page {
        margin: 0;
        min-height: 100vh;
        min-height: 100dvh;
        display: flex;
        flex-direction: column;
        font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
        font-size: 15px;
        line-height: 1.6;
    }
    .login-page *, .login-page *::before, .login-page *::after { box-sizing: border-box; }
    .login-page .login-topbar {
        position: relative;
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 48px;
        height: auto;
        padding: 10px 20px;
        gap: 14px;
        flex-shrink: 0;
    }
    .login-page .info-news { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
    .login-page .news-title { font-size: 12px; white-space: nowrap; }
    .login-page .welcome-text { flex: 1; min-width: 0; overflow: hidden; }
    .login-page .news-ticker { width: 100%; overflow: hidden; }
    .login-page .news-track { font-size: 13px; }
    .login-page .login-main {
        position: relative;
        flex: 1 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: auto;
        min-height: 480px;
        padding: 48px 20px;
        gap: 18px;
    }
    .login-page .login-overlay { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; }
    .login-page .login-card {
        position: relative;
        top: auto; right: auto; bottom: auto; left: auto;
        transform: none;
        z-index: 1;
        width: 100%;
        max-width: 420px;
        min-width: 0;
        height: auto;
        margin: 0;
        padding: 32px;
        border-radius: 18px;
    }
    .login-page .login-heading { margin-bottom: 24px; text-align: center; }
    .login-page .login-title { font-size: 28px; font-size: clamp(23px, 3vw, 30px); line-height: 1.3; }
    .login-page .login-school { font-size: 14px; line-height: 1.6; margin-top: 10px; overflow-wrap: break-word; }
    .login-page .login-form { width: 100%; }
    .login-page .login-input-group { position: relative; width: 100%; }
    .login-page .login-input {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        height: auto;
        min-height: 48px;
        padding: 12px 48px 12px 14px;
        font-family: inherit;
        font-size: 16px;
        line-height: 1.5;
        border-radius: 10px;
    }
    .login-page .input-icon {
        position: absolute;
        top: 50%; right: 16px; left: auto;
        transform: translateY(-50%);
        pointer-events: none;
    }
    .login-page .login-username-name { overflow-wrap: break-word; }
    .login-page .login-button {
        width: 100%;
        min-height: 48px;
        height: auto;
        margin-top: 16px;
        padding: 12px 16px;
        font-family: inherit;
        font-size: 15px;
        line-height: 1.5;
        border-radius: 10px;
        touch-action: manipulation;
    }
    .login-page .login-links { margin-top: 16px; text-align: center; }
    .login-page .login-back { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px; }
    .login-page .login-status-outside {
        position: relative;
        top: auto; right: auto; bottom: auto; left: auto;
        transform: none;
        z-index: 1;
        width: 100%;
        max-width: 420px;
        margin: 0;
        font-size: 14px;
        line-height: 1.6;
        text-align: center;
        overflow-wrap: break-word;
    }
    .login-page .login-input:focus-visible,
    .login-page .login-button:focus-visible,
    .login-page a:focus-visible { outline: 3px solid #79b6ff; outline-offset: 3px; }
    .login-page .sk-footer { position: relative; width: 100%; flex-shrink: 0; padding: 24px 0; }
    .login-page .sk-footer .row { row-gap: 16px; }
    .login-page .footer-center, .login-page .footer-copy { font-size: 12px; line-height: 1.7; overflow-wrap: break-word; }
    @media (max-width: 991.98px) {
        .login-page .login-main { min-height: 440px; padding: 36px 20px; }
        .login-page .footer-center, .login-page .footer-copy { text-align: left; margin-top: 0; }
    }
    @media (max-width: 575.98px) {
        .login-page .login-topbar { padding: 10px 12px; gap: 10px; }
        .login-page .info-news { gap: 5px; }
        .login-page .news-title { font-size: 10px; }
        .login-page .news-track { font-size: 12px; }
        .login-page .login-main { min-height: 380px; padding: 28px 16px; gap: 14px; }
        .login-page .login-card { padding: 26px 20px; border-radius: 16px; }
        .login-page .login-school { font-size: 13px; }
        .login-page .sk-footer { padding: 20px 0; }
    }
    @media (max-height: 500px) and (orientation: landscape) {
        .login-page .login-main { min-height: 0; padding-top: 24px; padding-bottom: 24px; }
    }
    @media (prefers-reduced-motion: reduce) {
        .login-page *, .login-page *::before, .login-page *::after { animation: none !important; transition: none !important; }
        .login-page .news-ticker { overflow-x: auto; }
        .login-page .news-track { transform: none !important; }
    }

/* Penyesuaian pasangan PHP/CSS: mempertahankan warna dan latar baseline. */
.login-page .login-card { max-width: 620px; box-shadow: 0 8px 24px rgba(0,0,0,.22); }
.login-page .login-title { letter-spacing: 2px; }
.login-page .login-school { letter-spacing: .5px; }
.login-page .login-input-group { height: auto; min-height: 48px; overflow: visible; }
.login-page .input-icon { right: 1px; width: 44px; height: calc(100% - 2px); min-height: 0; font-size: 21px; border-radius: 0 9px 9px 0; }
.login-page .login-status-outside { max-width: 620px; color: #ffffff; }
.login-page .login-links { justify-content: center; flex-wrap: wrap; }
.login-page .login-links a { font-size: 14px; white-space: normal; }
.login-page .login-topbar { height: 52px; min-height: 52px; padding: 0; gap: 0; align-items: stretch; }
.login-page .info-news { flex: 0 0 160px; width: 160px; min-width: 0; padding: 0 12px; }
.login-page .news-icon { font-size: 19px; }
.login-page .news-title { font-size: 13px; letter-spacing: .2px; }
.login-page .welcome-text { width: auto; height: auto; }
.login-page .news-ticker { height: 100%; }
.login-page .news-track { font-size: 14px; height: 100%; animation: loginTickerSeamless 40s linear infinite; }
.login-page .login-ticker-welcome { padding-left: 20px; }
.login-page .news-track, .login-page .login-ticker-welcome, .login-page .login-ticker-announcement { color: #ffffff; }
.login-page .news-ticker:hover .news-track, .login-page .news-ticker:focus-within .news-track { animation-play-state: paused; }
@keyframes loginTickerSeamless { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (max-width: 600px) {
    .login-page .login-topbar { flex-direction: column; height: auto; min-height: 76px; }
    .login-page .info-news { flex: 0 0 36px; width: 100%; height: 36px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.8); }
    .login-page .welcome-text { flex: 0 0 40px; width: 100%; height: 40px; }
    .login-page .news-track { font-size: 12px; }
    .login-page .login-ticker-loop-space { width: 180px; min-width: 180px; }
}
@media (prefers-reduced-motion: reduce) {
    .login-page .news-ticker { overflow-x: auto; }
    .login-page .news-track { animation: none; transform: none; will-change: auto; }
    .login-page .login-ticker-welcome + .login-ticker-welcome { display: none; }
}