/* ============================================================
   NeoSIAK Auth Design System ("Gateway")
   Palet: navy institusional (KTM) + kuning stabilo logo NeoSIAK
   Display: EB Garamond (akademik) / UI: Inter (bawaan tema)
   Dipakai oleh: login, lupa/reset password, sinkronisasi akun,
   aktivasi akun, dan halaman informasi publik.
   ============================================================ */

:root {
    --np-navy-950: #0a1128;
    --np-navy-900: #101f4e;
    --np-navy-800: #16307c;
    --np-navy-600: #2a54c4;
    --np-yellow: #ffe500;
    --np-ink: #0f172a;
    --np-paper: #ffffff;
    --np-gray: #64748b;
    --np-line: #e2e8f0;
}

body#kt_body.page-bg,
body#kt_body.np-page {
    background:
        radial-gradient(circle at 80% 0%, rgba(42, 84, 196, 0.35), transparent 50%),
        linear-gradient(160deg, var(--np-navy-950) 0%, var(--np-navy-900) 55%, var(--np-navy-800) 100%) !important;
    background-attachment: fixed !important;
}

/* ============================================================
   Komponen form bersama
   ============================================================ */

.np-eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--np-navy-600);
}

.np-field {
    margin-bottom: 1.35rem;
    text-align: left;
}

.np-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--np-ink);
    margin-bottom: 0.45rem;
}

.np-input {
    display: block;
    width: 100%;
    font-size: 1rem;
    color: var(--np-ink);
    background: #f4f6fa;
    border: 1px solid transparent;
    border-radius: 0.7rem;
    padding: 0.8rem 1rem;
    min-height: 48px;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.np-input::placeholder {
    color: #9aa4b6;
}

.np-input:focus {
    outline: none;
    background: #fff;
    border-color: var(--np-navy-600);
    box-shadow: 0 0 0 3px rgba(42, 84, 196, 0.18);
}

.np-input.is-invalid {
    border-color: #dc2626;
}

.np-input[readonly],
.np-input[disabled] {
    color: var(--np-gray);
    background: #eef1f6;
}

.np-error {
    display: block;
    font-size: 0.82rem;
    color: #dc2626;
    margin-top: 0.4rem;
    text-align: left;
}

.np-hint {
    font-size: 0.82rem;
    color: var(--np-gray);
    margin-top: 0.4rem;
    text-align: left;
}

.np-alert {
    text-align: left;
    font-size: 0.9rem;
    border-radius: 0.7rem;
    padding: 0.9rem 1.1rem;
    margin-bottom: 1.5rem;
}

.np-alert.np-alert-danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.np-alert.np-alert-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.np-alert ul {
    margin: 0.35rem 0 0;
    padding-left: 1.1rem;
}

.np-toggle-eye {
    position: absolute;
    top: 50%;
    right: 0.55rem;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    border-radius: 0.5rem;
    cursor: pointer;
}

.np-toggle-eye:hover i,
.np-toggle-eye:focus-visible i {
    color: var(--np-navy-800) !important;
}

.np-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 0.7rem;
    background: var(--np-navy-800);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.np-submit:hover {
    background: var(--np-navy-900);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(16, 31, 78, 0.35);
    color: #fff;
}

.np-submit:active {
    transform: translateY(0);
}

.np-submit:focus-visible {
    outline: 3px solid var(--np-yellow);
    outline-offset: 2px;
}

.np-submit[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.np-submit .indicator-progress {
    display: none;
}

.np-link {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--np-navy-600);
    text-decoration: none;
}

.np-link:hover,
.np-link:focus-visible {
    color: var(--np-navy-800);
    text-decoration: underline;
}

.np-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0 1.25rem;
    color: var(--np-gray);
    font-size: 0.82rem;
    font-weight: 600;
}

.np-divider::before,
.np-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--np-line);
}

.np-path {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.05rem;
    border: 1px solid var(--np-line);
    border-radius: 0.85rem;
    text-decoration: none;
    text-align: left;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.np-path+.np-path {
    margin-top: 0.75rem;
}

.np-path:hover,
.np-path:focus-visible {
    border-color: var(--np-navy-600);
    background: rgba(42, 84, 196, 0.04);
}

.np-path .path-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 0.7rem;
    background: rgba(22, 48, 124, 0.08);
}

.np-path .path-title {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--np-ink);
    line-height: 1.3;
}

.np-path .path-sub {
    display: block;
    font-size: 0.78rem;
    color: var(--np-gray);
    margin-top: 0.1rem;
}

/* ============================================================
   Halaman login ("Gateway" dua panel)
   ============================================================ */

.np-shell {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    overflow-x: clip;
}

@media (min-width: 992px) {
    .np-shell {
        flex-direction: row;
    }
}

.np-campus {
    --np-campus-pad: clamp(1.25rem, 5vw, 2rem);
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1 1 50%;
    padding: 2rem var(--np-campus-pad) 0;
    color: #fff;
    overflow: hidden;
}

@media (min-width: 992px) {
    .np-campus {
        --np-campus-pad: clamp(2rem, 3.5vw, 3rem);
        padding: 3rem var(--np-campus-pad) 0;
    }
}

.np-campus-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.np-brand-sep {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.3);
}

/* Logo Dies Natalis ke-60: lockup persegi, perlu lebih tinggi dari logo UP */
.np-campus-brand .np-hut-logo {
    height: 72px;
}

/* Di bawah lg panel kampus jadi hero ringkas di atas form:
   crest kecil + headline + siluet; daftar informasi pindah ke lembar form */
@media (max-width: 991.98px) {
    .np-campus {
        padding-top: 1.5rem;
    }

    .np-campus .np-campus-brand {
        margin-bottom: 1rem !important;
    }

    .np-campus .np-campus-brand img {
        height: 30px;
    }

    .np-campus .np-campus-brand .np-hut-logo {
        height: 48px;
    }

    .np-brand-sep {
        height: 22px;
    }

    .np-campus .np-news {
        display: none;
    }

    .np-campus .np-headline {
        font-size: clamp(1.5rem, 5.5vw, 1.9rem);
        margin: 0.5rem 0 0.6rem;
    }

    .np-campus .np-sub {
        font-size: 0.9rem;
        margin-bottom: 1.25rem;
    }

    .np-campus .np-skyline {
        padding-top: 0.25rem;
    }
}

.np-campus>* {
    position: relative;
    z-index: 1;
}

.np-campus-inner {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    width: 100%;
}

.np-campus .np-eyebrow {
    color: var(--np-yellow);
}

.np-headline {
    font-family: 'EB Garamond', Georgia, serif;
    font-weight: 700;
    font-size: clamp(1.75rem, 2.6vw + 1rem, 3.1rem);
    line-height: 1.15;
    color: #fff;
    margin: 0.75rem 0 1rem;
    max-width: 17ch;
}

.np-headline mark {
    background: linear-gradient(transparent 12%, var(--np-yellow) 12%, var(--np-yellow) 88%, transparent 88%);
    color: var(--np-navy-950);
    padding: 0 0.15em;
}

.np-sub {
    font-size: clamp(0.92rem, 0.5vw + 0.8rem, 1.02rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.72);
    max-width: 46ch;
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.np-news {
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-bottom: 2rem;
}

.np-news-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.np-news-title h2 {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.np-news-list {
    overflow-y: auto;
    max-height: clamp(240px, 32vh, 320px);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding-right: 0.25rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.np-news-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.np-news-item:hover,
.np-news-item:focus-visible {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 229, 0, 0.45);
}

.np-news-item .news-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.np-news-item .news-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.15rem;
}

.np-news-item .news-arrow {
    margin-left: auto;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.4);
}

.np-news-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: 0.85rem;
}

.np-news-all {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--np-yellow);
    text-decoration: none;
}

.np-news-all:hover,
.np-news-all:focus-visible {
    color: #fff;
}

.np-skyline {
    display: block;
    width: calc(100% + var(--np-campus-pad, 2rem) * 2);
    margin: auto calc(var(--np-campus-pad, 2rem) * -1) 0;
    padding-top: 1rem;
    flex-shrink: 0;
}

.np-sheet {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    background: var(--np-paper);
    padding: 2rem 1.25rem calc(2rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 992px) {
    .np-sheet {
        flex: 1 1 50%;
        padding: clamp(2.25rem, 3.5vw, 3.5rem) clamp(2rem, 4vw, 4rem);
        box-shadow: -24px 0 60px rgba(4, 10, 35, 0.45);
    }

    /* Di layar tinggi, blok form dipusatkan vertikal (footer tetap di bawah):
       margin-top auto di brand + auto di footer membagi rata sisa ruang */
    .np-sheet-brand {
        margin-top: auto;
    }
}

.np-sheet-inner {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.np-sheet-title {
    font-family: 'EB Garamond', Georgia, serif;
    font-weight: 700;
    font-size: clamp(1.65rem, 1vw + 1.3rem, 2rem);
    color: var(--np-ink);
    margin: clamp(1.5rem, 3vw, 2.25rem) 0 0.35rem;
}

.np-sheet-sub {
    font-size: 0.95rem;
    color: var(--np-gray);
    margin-bottom: 2rem;
}

/* Daftar informasi ringkas di lembar form (mobile) */
.np-mini-news .mini-item {
    display: block;
    padding: 0.75rem 0.25rem;
    border-bottom: 1px solid var(--np-line);
    text-decoration: none;
}

.np-mini-news .mini-item:last-child {
    border-bottom: 0;
}

.np-mini-news .mini-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--np-ink);
    line-height: 1.4;
}

.np-mini-news .mini-item:hover .mini-title,
.np-mini-news .mini-item:focus-visible .mini-title {
    color: var(--np-navy-600);
}

.np-mini-news .mini-date {
    display: block;
    font-size: 0.75rem;
    color: #9aa4b6;
    margin-top: 0.15rem;
}

.np-sheet-footer {
    margin-top: auto;
    padding-top: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

@media (max-width: 575.98px) {
    .np-sheet-footer {
        justify-content: center;
        text-align: center;
        padding-top: 2rem;
    }
}

.np-copy {
    font-size: 0.75rem;
    color: #9aa4b6;
}

/* ============================================================
   Layout fokus (sinkronisasi, aktivasi, lupa/reset password,
   halaman informasi) - lembar tunggal di tengah
   ============================================================ */

.npf-page {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100dvh;
    padding: 2.5rem 1rem 3rem;
    z-index: 1;
}

.npf-brand {
    margin-bottom: 1.75rem;
}

.npf-card {
    width: 100%;
    max-width: 520px;
    background: var(--np-paper);
    border-radius: 1.25rem;
    box-shadow: 0 20px 60px rgba(4, 10, 35, 0.45);
    padding: 2.5rem 2.5rem;
}

.npf-card.npf-card-wide {
    max-width: 900px;
}

@media (max-width: 575.98px) {
    .npf-card {
        padding: 1.75rem 1.35rem;
    }
}

.npf-title {
    font-family: 'EB Garamond', Georgia, serif;
    font-weight: 700;
    font-size: 1.85rem;
    line-height: 1.2;
    color: var(--np-ink);
    margin: 0.4rem 0 0.4rem;
}

.npf-sub {
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--np-gray);
    margin-bottom: 1.75rem;
}

.npf-foot {
    margin-top: 1.5rem;
    text-align: center;
}

.npf-copy {
    margin-top: 1.75rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
}

.npf-skyline {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ---------- Penanda langkah (aktivasi akun) ---------- */

.npf-steps {
    display: flex;
    justify-content: center;
    gap: 0;
    list-style: none;
    margin: 0 0 1.75rem;
    padding: 0;
}

.npf-steps li {
    display: flex;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: #9aa4b6;
}

.npf-steps li:not(:first-child)::before {
    content: '';
    width: 28px;
    height: 1px;
    background: var(--np-line);
    margin: 0 0.6rem;
}

@media (max-width: 479.98px) {
    .npf-steps li {
        font-size: 0.7rem;
    }

    .npf-steps li:not(:first-child)::before {
        width: 14px;
        margin: 0 0.35rem;
    }

    .npf-steps .step-dot {
        width: 20px;
        height: 20px;
        margin-right: 0.3rem;
    }
}

.npf-steps .step-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #eef1f6;
    color: #9aa4b6;
    font-size: 0.72rem;
    font-weight: 700;
    margin-right: 0.4rem;
}

.npf-steps li.active {
    color: var(--np-navy-800);
}

.npf-steps li.active .step-dot {
    background: var(--np-navy-800);
    color: #fff;
}

.npf-steps li.done {
    color: var(--np-navy-600);
}

.npf-steps li.done .step-dot {
    background: rgba(42, 84, 196, 0.12);
    color: var(--np-navy-600);
}

/* ---------- Kotak OTP ---------- */

.npf-otp {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.25rem 0 0.5rem;
}

.npf-otp input {
    width: 52px;
    height: 60px;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--np-ink);
    background: #f4f6fa;
    border: 1px solid transparent;
    border-radius: 0.7rem;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.npf-otp input:focus {
    outline: none;
    background: #fff;
    border-color: var(--np-navy-600);
    box-shadow: 0 0 0 3px rgba(42, 84, 196, 0.18);
}

@media (max-width: 420px) {
    .npf-otp input {
        width: 44px;
        height: 54px;
        font-size: 1.35rem;
    }
}

/* ---------- Artikel informasi ---------- */

.npf-article {
    text-align: left;
    color: var(--np-ink);
    line-height: 1.7;
    font-size: 1rem;
}

.npf-article h1,
.npf-article h2,
.npf-article h3,
.npf-article h4 {
    color: var(--np-ink);
    margin: 1.5rem 0 0.6rem;
    line-height: 1.3;
}

.npf-article img {
    max-width: 100%;
    height: auto;
    border-radius: 0.7rem;
    margin: 1rem 0;
}

.npf-article table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.npf-article table th,
.npf-article table td {
    border: 1px solid var(--np-line);
    padding: 0.5rem 0.75rem;
}

.npf-meta {
    font-size: 0.82rem;
    color: var(--np-gray);
    margin-bottom: 1.5rem;
}

.npf-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    text-align: left;
}

.npf-news-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--np-line);
    border-radius: 0.85rem;
    padding: 1.25rem;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.npf-news-card:hover,
.npf-news-card:focus-visible {
    border-color: var(--np-navy-600);
    box-shadow: 0 8px 24px rgba(16, 31, 78, 0.1);
    transform: translateY(-2px);
}

.npf-news-card .card-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--np-ink);
    line-height: 1.35;
    margin-bottom: 0.5rem;
}

.npf-news-card .card-excerpt {
    font-size: 0.85rem;
    color: var(--np-gray);
    line-height: 1.55;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.npf-news-card .card-date {
    margin-top: auto;
    font-size: 0.76rem;
    color: #9aa4b6;
}

/* ============================================================
   Animasi masuk
   ============================================================ */

@media (prefers-reduced-motion: no-preference) {

    .np-campus>*,
    .np-sheet-inner,
    .npf-card,
    .npf-brand {
        animation: np-rise 0.45s ease-out both;
    }

    .np-sheet-inner,
    .npf-card {
        animation-delay: 0.1s;
    }

    .np-campus .np-news {
        animation-delay: 0.15s;
    }

    @keyframes np-rise {
        from {
            opacity: 0;
            transform: translateY(14px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

@media (prefers-reduced-motion: reduce) {

    .np-submit,
    .npf-news-card {
        transition: none;
    }
}
