@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --navy: #0b1f3a;
    --navy-deep: #06172e;
    --blue: #123b68;
    --blue-light: #2c73c9;
    --orange: #f28c28;
    --orange-light: #ffab4f;
    --white: #ffffff;
    --text: #10264a;
    --muted: #647795;
    --line: #dbe4ef;
}

* { box-sizing: border-box; }

html, body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: #edf4fc;
}

button, input { font: inherit; }
button { cursor: pointer; }

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    padding: 32px;
    background:
        radial-gradient(circle at 10% 12%, rgba(56, 122, 206, .16), transparent 24%),
        radial-gradient(circle at 91% 85%, rgba(65, 127, 210, .13), transparent 28%),
        #edf4fc;
}

.ambient {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    border: 1px solid rgba(67, 128, 205, .08);
}

.ambient-one {
    width: 760px;
    height: 760px;
    left: -470px;
    top: -430px;
}

.ambient-two {
    width: 650px;
    height: 650px;
    right: -400px;
    bottom: -400px;
}

/* 85% desktop scale: deliberately larger than the previous 70% version. */
.login-card {
    width: min(1180px, 85vw);
    height: min(720px, 85vh);
    min-height: 620px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    z-index: 2;
    overflow: hidden;
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 28px 80px rgba(10, 39, 76, .18);
}

/* =========================
   LEFT / BRANDING
   ========================= */
.brand-panel {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(145deg, #071c38 0%, #0b2a55 58%, #09203f 100%);
}

.brand-glow {
    position: absolute;
    width: 420px;
    height: 420px;
    right: -120px;
    bottom: -170px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(242, 140, 40, .95) 0%, rgba(242, 140, 40, .28) 25%, transparent 62%);
    filter: blur(18px);
    opacity: .8;
}

.brand-photo {
    position: absolute;
    inset: 30% -8% 0 0;
    background:
        linear-gradient(180deg, rgba(4, 23, 49, .05), rgba(4, 23, 49, .76)),
        url('../assets/img/login-school.jpg') center/cover no-repeat;
    opacity: .58;
    filter: saturate(.8) contrast(1.05);
}

/* Jika foto login-school.jpg belum tersedia, gradient tetap menjadi fallback. */
.brand-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(4, 22, 46, .06) 20%, rgba(4, 22, 46, .78) 82%, rgba(4, 22, 46, .96) 100%),
        linear-gradient(90deg, rgba(5, 24, 48, .12), rgba(5, 24, 48, .16));
}

.brand-inner {
    position: relative;
    z-index: 3;
    height: 100%;
    padding: 42px 48px 30px;
    display: flex;
    flex-direction: column;
}

.school-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.school-logo {
    width: 96px;
    height: 96px;
    object-fit: contain;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.school-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.fallback-nine { display: none; }
.school-logo.logo-fallback { background: var(--orange); color: #fff; }
.school-logo.logo-fallback .fallback-nine { display: block; font-size: 28px; font-weight: 800; }

.school-name {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.school-name strong {
    font-size: 15px;
    line-height: 1.15;
    letter-spacing: .1px;
}

.school-name span {
    margin-top: 5px;
    font-size: 9px;
    color: rgba(255,255,255,.68);
}

.vokasi-mark {
    margin-left: auto;
    font-size: 8px;
    line-height: 1.85;
    letter-spacing: 3px;
    color: rgba(255,255,255,.62);
}

.vokasi-mark i {
    display: block;
    width: 28px;
    height: 3px;
    margin-top: 7px;
    background: var(--orange);
}

.brand-content {
    margin-top: auto;
    margin-bottom: 8px;
    max-width: 460px;
}

.system-name {
    font-size: clamp(42px, 4.1vw, 60px);
    line-height: .96;
    font-weight: 800;
    letter-spacing: -2.6px;
}

.system-name span { color: #fff; }
.system-name strong { color: var(--orange); }

.brand-content h1 {
    margin: 16px 0 15px;
    font-size: clamp(22px, 2vw, 30px);
    line-height: 1.13;
    font-weight: 500;
    letter-spacing: -.6px;
}

.orange-line {
    width: 52px;
    height: 4px;
    margin-bottom: 17px;
    background: var(--orange);
}

.brand-content p {
    max-width: 390px;
    margin: 0;
    font-size: 12px;
    line-height: 1.65;
    color: rgba(255,255,255,.72);
}

.brand-quote {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 12px 0 20px;
}

.quote-mark {
    margin-top: -4px;
    font-size: 42px;
    line-height: 1;
    color: rgba(116, 165, 231, .55);
}

.brand-quote p {
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.4;
    font-style: italic;
    color: rgba(255,255,255,.84);
}

.brand-features {
    display: flex;
    align-items: center;
    gap: 17px;
    margin-bottom: 23px;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 65px;
    font-size: 9px;
    color: rgba(255,255,255,.78);
}

.feature-icon {
    color: var(--orange);
    font-size: 21px;
    line-height: 1;
}

.feature-divider {
    width: 1px;
    height: 25px;
    background: rgba(255,255,255,.18);
}

.brand-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 8px;
    letter-spacing: 3px;
    color: rgba(255,255,255,.48);
}

.footer-year {
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: 3px;
}

.footer-year i {
    display: inline-block;
    width: 55px;
    height: 2px;
    background: var(--orange);
}

.nine-watermark {
    position: absolute;
    right: -8px;
    bottom: -95px;
    font-size: 290px;
    line-height: 1;
    font-weight: 800;
    color: rgba(79, 141, 220, .09);
    z-index: 1;
}

.dot-pattern {
    position: absolute;
    right: 29%;
    bottom: 20%;
    width: 80px;
    height: 80px;
    opacity: .45;
    background-image: radial-gradient(circle, rgba(116,165,231,.75) 1.5px, transparent 1.6px);
    background-size: 13px 13px;
    z-index: 2;
}

/* =========================
   RIGHT / LOGIN
   ========================= */
.form-panel {
    position: relative;
    overflow: hidden;
    background: #fff;
}

.form-inner {
    position: relative;
    z-index: 5;
    width: min(86%, 475px);
    margin: 0 auto;
    padding-top: 17%;
}

.portal-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.8px;
    color: #7b8aa0;
}

.portal-label span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--orange);
}

.form-inner h2 {
    margin: 0;
    font-size: clamp(34px, 3.3vw, 46px);
    line-height: 1.02;
    letter-spacing: -2px;
    color: var(--text);
}

.form-inner h3 {
    margin: 4px 0 12px;
    font-size: clamp(31px, 3vw, 42px);
    line-height: 1.05;
    font-weight: 500;
    letter-spacing: -1.8px;
    color: #3d567a;
}

.form-inner h3 strong { color: var(--orange); }

.form-intro {
    margin: 0 0 28px;
    color: #7284a0;
    font-size: 13px;
    line-height: 1.55;
}

.login-error {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    margin: -10px 0 18px;
    border: 1px solid #ffd6d6;
    border-radius: 10px;
    background: #fff7f7;
    color: #a53f3f;
    font-size: 11px;
}

.login-error span {
    width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
    flex: 0 0 19px;
    border-radius: 50%;
    background: #e76363;
    color: #fff;
    font-weight: 800;
}

.field-group { margin-bottom: 21px; }

.field-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #172d50;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.label-row label { margin-bottom: 8px; }

.forgot-text {
    margin-bottom: 8px;
    font-size: 9px;
    color: #7b8ca5;
}

.input-box {
    position: relative;
}

.input-box input {
    width: 100%;
    height: 53px;
    padding: 0 45px 0 48px;
    border: 1px solid var(--line);
    border-radius: 11px;
    outline: none;
    background: #fff;
    color: var(--text);
    font-size: 12px;
    transition: .2s ease;
}

.input-box input:focus {
    border-color: rgba(38, 104, 190, .55);
    box-shadow: 0 0 0 4px rgba(38, 104, 190, .08);
}

.input-box input::placeholder { color: #93a3ba; }

.input-icon {
    position: absolute;
    left: 17px;
    top: 50%;
    transform: translateY(-50%);
    color: #3f5c83;
    font-size: 19px;
    z-index: 2;
}

.toggle-password {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #557092;
    font-size: 16px;
}

.eye-closed { display: none; }
.toggle-password.is-visible .eye-open { display: none; }
.toggle-password.is-visible .eye-closed { display: inline; }

.remember-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    width: fit-content;
    margin: -2px 0 22px;
    font-size: 11px;
    color: #4c6080;
    cursor: pointer;
}

.remember-row input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkmark {
    width: 19px;
    height: 19px;
    border: 1.5px solid #9aabc1;
    border-radius: 4px;
    background: #fff;
    transition: .15s;
}

.remember-row input:checked + .checkmark {
    border-color: var(--orange);
    background: var(--orange);
    box-shadow: inset 0 0 0 4px #fff;
}

.login-button {
    width: 100%;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px 0 24px;
    border: 0;
    border-radius: 27px;
    background: linear-gradient(100deg, #ff7812, #ff9b2e);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .5px;
    box-shadow: 0 12px 25px rgba(242,140,40,.24);
    transition: transform .2s, box-shadow .2s;
}

.login-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 15px 30px rgba(242,140,40,.32);
}

.button-arrow {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,.17);
    font-size: 19px;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 56px;
    padding-top: 18px;
    border-top: 1px solid #eef2f7;
    color: #5e7290;
    font-size: 9px;
}

.form-footer div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-footer strong {
    font-size: 10px;
    color: #526987;
}

.website {
    font-weight: 700;
    color: var(--text);
}

.wave {
    position: absolute;
    pointer-events: none;
    border: 1px solid rgba(81, 139, 217, .24);
    border-radius: 50%;
    z-index: 1;
}

.wave-top {
    width: 560px;
    height: 320px;
    right: -250px;
    top: -230px;
    transform: rotate(-18deg);
    box-shadow:
        0 0 0 8px rgba(242,140,40,.03),
        0 0 0 17px rgba(81,139,217,.035),
        0 0 0 26px rgba(242,140,40,.025),
        0 0 0 35px rgba(81,139,217,.025);
}

.wave-bottom {
    width: 470px;
    height: 260px;
    right: -245px;
    bottom: -200px;
    transform: rotate(25deg);
    border-color: rgba(242,140,40,.18);
    box-shadow:
        0 0 0 8px rgba(81,139,217,.035),
        0 0 0 17px rgba(242,140,40,.03),
        0 0 0 26px rgba(81,139,217,.025);
}

@media (max-width: 1000px) {
    .login-page { padding: 22px; }
    .login-card {
        width: min(1100px, 92vw);
        height: auto;
        min-height: 650px;
    }
    .brand-inner { padding-left: 36px; padding-right: 36px; }
    .form-inner { width: 86%; }
}

@media (max-width: 760px) {
    .login-page { padding: 12px; }
    .login-card {
        width: 100%;
        height: auto;
        min-height: 0;
        grid-template-columns: 1fr;
        border-radius: 20px;
    }
    .brand-panel { min-height: 390px; }
    .brand-inner { padding: 28px 25px 22px; }
    .school-logo { width: 48px; height: 48px; flex-basis: 48px; }
    .school-name strong { font-size: 13px; }
    .vokasi-mark { display: none; }
    .brand-content { margin-top: 62px; }
    .system-name { font-size: 43px; }
    .brand-content h1 { font-size: 23px; }
    .brand-quote { display: none; }
    .brand-features { margin-top: 20px; margin-bottom: 18px; }
    .nine-watermark { font-size: 220px; bottom: -80px; }
    .form-panel { min-height: 570px; }
    .form-inner {
        width: auto;
        margin: 0 25px;
        padding: 48px 0 28px;
    }
    .form-inner h2 { font-size: 33px; }
    .form-inner h3 { font-size: 31px; }
    .form-footer { margin-top: 40px; }
}

@media (max-width: 420px) {
    .brand-panel { min-height: 350px; }
    .brand-content { margin-top: 48px; }
    .system-name { font-size: 37px; }
    .brand-content h1 { font-size: 20px; }
    .brand-content p { font-size: 11px; }
    .brand-features { gap: 10px; }
    .feature { min-width: 58px; }
    .form-inner h2 { font-size: 29px; }
    .form-inner h3 { font-size: 27px; }
    .form-footer { font-size: 8px; }
    .website { display: none; }
}
