/* =====================================================
   LOGIN PAGE
   public/css/login.css
===================================================== */


/* =====================================================
   RESET
===================================================== */

* {
    box-sizing: border-box;
}


html,
body {
    margin: 0;
    padding: 0;

    min-height: 100%;
}


/* =====================================================
   BODY
===================================================== */

body {
    min-height: 100vh;

    position: relative;
    isolation: isolate;
    overflow-x: hidden;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 24px;

    font-family:
        'Plus Jakarta Sans',
        Arial,
        Helvetica,
        sans-serif;

    background:
        linear-gradient(135deg, #002f54 0%, #005596 52%, #003b6a 100%);

    color: #0f172a;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

body::before {
    inset: -20%;
    background:
        radial-gradient(circle at 18% 20%, rgba(246, 184, 0, .34), transparent 24%),
        radial-gradient(circle at 82% 76%, rgba(99, 168, 68, .28), transparent 27%),
        radial-gradient(circle at 70% 10%, rgba(22, 134, 199, .42), transparent 24%);
    filter: blur(8px);
    animation: login-glow-drift 16s ease-in-out infinite alternate;
}

body::after {
    background-image:
        linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px),
        linear-gradient(35deg, transparent 48%, rgba(246, 184, 0, .07) 49%, rgba(246, 184, 0, .07) 51%, transparent 52%);
    background-size: 58px 58px, 58px 58px, 220px 220px;
    opacity: .9;
    animation: login-grid-drift 28s linear infinite;
}


/* =====================================================
   LOGIN CONTAINER
===================================================== */

.login-container {
    position: relative;
    z-index: 1;

    width: 100%;

    max-width: 1080px;

    margin: 0 auto;

    min-height: auto;

    padding: 0;

    display: grid;
    grid-template-columns: minmax(0, 1fr) 460px;
    align-items: center;
    gap: 72px;
}

.login-container::before,
.login-container::after {
    content: "";
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, .16);
    pointer-events: none;
}

.login-container::before {
    inset: -42px -54px;
    border-radius: 32px;
    transform: rotate(-3deg);
}

.login-container::after {
    inset: -24px -72px;
    border-color: rgba(246, 184, 0, .18);
    border-radius: 38px;
    transform: rotate(4deg);
}

/* =====================================================
   VISUAL PETA PERTANAHAN
===================================================== */

.login-showcase {
    min-width: 0;
    color: #ffffff;
}

.showcase-copy {
    max-width: 560px;
}

.showcase-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    color: #f8d765;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 1.25px;
    text-transform: uppercase;
}

.showcase-kicker::before {
    content: "";
    width: 28px;
    height: 2px;
    border-radius: 999px;
    background: #f6b800;
}

.showcase-copy h2 {
    max-width: 520px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(34px, 4vw, 54px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -1.8px;
    text-wrap: balance;
}

.showcase-copy p {
    max-width: 510px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, .76);
    font-size: 15px;
    line-height: 1.75;
}

.cadastral-map {
    position: relative;
    width: min(100%, 560px);
    margin-top: 28px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 22px;
    background: rgba(0, 38, 68, .22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
    backdrop-filter: blur(5px);
}

.cadastral-map svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.map-plot {
    fill: rgba(255, 255, 255, .035);
    stroke: rgba(255, 255, 255, .38);
    stroke-width: 1.5;
    stroke-linejoin: round;
    stroke-dasharray: 760;
    stroke-dashoffset: 760;
    animation: map-plot-draw 2.2s ease-out forwards;
}

.map-plot--2 { animation-delay: .18s; }
.map-plot--3 { animation-delay: .34s; }
.map-plot--4 { animation-delay: .5s; }
.map-plot--5 { animation-delay: .66s; }

.map-route {
    fill: none;
    stroke: #f6b800;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 10 12;
    opacity: .8;
    animation: map-route-flow 9s linear infinite;
}

.map-point {
    fill: #79c854;
    stroke: rgba(255, 255, 255, .95);
    stroke-width: 3;
    transform-box: fill-box;
    transform-origin: center;
    animation: map-point-pulse 2.4s ease-in-out infinite;
}

.map-point--2 { animation-delay: .7s; }
.map-point--3 { animation-delay: 1.4s; }

.map-tag {
    position: absolute;
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    background: rgba(0, 47, 84, .84);
    color: rgba(255, 255, 255, .88);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .8);
    backdrop-filter: blur(8px);
    animation: map-tag-float 4s ease-in-out infinite;
}

.map-tag--1 {
    top: 31%;
    left: 10%;
}

.map-tag--2 {
    right: 8%;
    bottom: 20%;
    animation-delay: -2s;
}

.showcase-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.showcase-features span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 11px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 10px;
    background: rgba(255, 255, 255, .065);
    color: rgba(255, 255, 255, .82);
    font-size: 11px;
    font-weight: 600;
}

.showcase-features span::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f6b800;
    box-shadow: 0 0 0 3px rgba(246, 184, 0, .13);
}


/* =====================================================
   LOGIN CARD
===================================================== */

.login-card {
    width: 100%;

    padding: 38px;

    background: rgba(255, 255, 255, .97);

    border: 1px solid #dfe8ed;
    border-top: 4px solid #f6b800;

    border-radius: 16px;

    backdrop-filter: blur(14px);
    animation: login-card-enter .7s cubic-bezier(.2, .8, .2, 1) both;

    box-shadow:
        0 28px 65px -24px rgba(0, 20, 38, .62),
        0 1px 2px rgba(15, 23, 42, .06);
}


/* =====================================================
   LOGIN HEADER
===================================================== */

.login-header {
    text-align: center;

    margin-bottom: 28px;
}


/* =====================================================
   LOGO
===================================================== */

.login-header .logo {
    width: 76px;

    height: 76px;

    margin: 0 auto 16px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 50%;
    background: rgba(255, 255, 255, .97);
}

.login-header .logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: login-logo-float 4.5s ease-in-out infinite;
}

.institution-name {
    margin: -4px 0 18px;
    color: #005596;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.45;
    letter-spacing: .45px;
    text-transform: uppercase;
}


/* =====================================================
   TITLE
===================================================== */

.login-header h1 {
    margin: 0 0 8px;

    color: #003b6a;

    font-size: 22px;

    font-weight: 800;

    line-height: 1.3;

    letter-spacing: -.4px;
}


/* =====================================================
   SUBTITLE
===================================================== */

.login-header p {
    margin: 0;

    color: #64748b;

    font-size: 13.5px;

    font-weight: 400;

    line-height: 1.5;
}


/* =====================================================
   ALERT
===================================================== */

.alert {
    padding: 12px 14px;

    margin-bottom: 18px;

    border-radius: 9px;

    font-size: 13px;

    line-height: 1.5;
}


/* SUCCESS */

.alert.success {
    background: #dcfce7;

    border: 1px solid #bbf7d0;

    color: #166534;
}


/* ERROR */

.alert.error {
    background: #fee2e2;

    border: 1px solid #fecaca;

    color: #991b1b;
}


/* ALERT LIST */

.alert ul {
    margin: 0;

    padding-left: 18px;
}


/* =====================================================
   FORM
===================================================== */

.login-form {
    width: 100%;
}


/* =====================================================
   FORM GROUP
===================================================== */

.form-group {
    width: 100%;

    margin-bottom: 18px;
}


/* =====================================================
   LABEL
===================================================== */

.form-group label {
    display: block;

    margin-bottom: 8px;

    color: #0f172a;

    font-size: 13.5px;

    font-weight: 700;

    line-height: 1.4;
}


/* =====================================================
   SEMUA INPUT
===================================================== */

/*
   Jangan menggunakan:
   input[type="password"]

   Karena ketika password ditampilkan,
   JavaScript biasanya mengubah type menjadi text.

   Dengan .form-group input,
   styling tetap berlaku untuk keduanya.
*/

.form-group input {
    box-sizing: border-box;

    width: 100%;

    height: 46px;

    padding: 0 14px;

    border: 1px solid #dfe3ee;

    border-radius: 10px;

    outline: none;

    background: #ffffff;

    color: #0f172a;

    font-family: inherit;

    font-size: 14px;

    font-weight: 400;

    line-height: 1.4;

    transition:
        border-color .16s ease,
        box-shadow .16s ease,
        background-color .16s ease;
}


/* =====================================================
   INPUT FOCUS
===================================================== */

.form-group input:focus {
    border-color: #005596;

    background: #ffffff;

    box-shadow:
        0 0 0 3px
        rgba(0, 85, 150, .10);
}


/* =====================================================
   INPUT HOVER
===================================================== */

.form-group input:hover {
    border-color: #cbd5e1;
}


/* =====================================================
   INPUT PLACEHOLDER
===================================================== */

.form-group input::placeholder {
    color: #94a3b8;

    opacity: 1;
}


/* =====================================================
   PASSWORD WRAPPER
===================================================== */

.password-wrapper {
    position: relative;

    width: 100%;

    display: flex;

    align-items: center;
}


/* =====================================================
   PASSWORD INPUT
===================================================== */

.password-wrapper input {
    width: 100%;

    padding-right: 46px;
}


/*
   Tetap mempertahankan style
   ketika type berubah menjadi text.
*/

.password-wrapper input[type="text"],
.password-wrapper input[type="password"] {
    width: 100%;

    height: 46px;

    padding-left: 14px;

    padding-right: 46px;

    border: 1px solid #dfe3ee;

    border-radius: 10px;

    outline: none;

    background: #ffffff;

    color: #0f172a;

    font-family: inherit;

    font-size: 14px;
}


/* =====================================================
   PASSWORD INPUT FOCUS
===================================================== */

.password-wrapper input:focus {
    border-color: #005596;

    box-shadow:
        0 0 0 3px
        rgba(0, 85, 150, .10);
}


/* =====================================================
   PASSWORD INPUT HOVER
===================================================== */

.password-wrapper input:hover {
    border-color: #cbd5e1;
}


/* =====================================================
   TOGGLE PASSWORD
===================================================== */

.toggle-password {
    position: absolute;

    top: 50%;

    right: 8px;

    transform: translateY(-50%);

    width: 34px;

    height: 34px;

    padding: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    border: none;

    border-radius: 7px;

    background: transparent;

    color: #6b7280;

    cursor: pointer;

    z-index: 5;

    transition:
        background-color .15s ease,
        color .15s ease;
}


/* =====================================================
   TOGGLE PASSWORD SVG
===================================================== */

.toggle-password svg {
    width: 20px;

    height: 20px;

    display: block;

    pointer-events: none;
}


/* =====================================================
   TOGGLE PASSWORD HOVER
===================================================== */

.toggle-password:hover {
    background: #eaf5fb;

    color: #005596;
}


/* =====================================================
   TOGGLE PASSWORD ACTIVE
===================================================== */

.toggle-password:active {
    background: #dceff8;

    color: #005596;
}


/* =====================================================
   REMOVE DEFAULT BUTTON OUTLINE
===================================================== */

.toggle-password:focus {
    outline: none;
}


/* =====================================================
   ACCESSIBILITY FOCUS
===================================================== */

.toggle-password:focus-visible {
    outline: 2px solid #005596;

    outline-offset: 2px;
}


/* =====================================================
   REMEMBER ME
===================================================== */

.remember {
    margin-bottom: 20px;

    color: #64748b;

    font-size: 13px;

    line-height: 1.4;
}


/* =====================================================
   REMEMBER LABEL
===================================================== */

.remember label {
    display: flex;

    align-items: center;

    gap: 8px;

    cursor: pointer;
}


/* =====================================================
   CHECKBOX
===================================================== */

.remember input[type="checkbox"] {
    width: 17px;

    height: 17px;

    margin: 0;

    accent-color: #005596;

    cursor: pointer;
}


/* =====================================================
   LOGIN BUTTON
===================================================== */

.btn-login {
    box-sizing: border-box;

    width: 100%;

    height: 46px;

    padding: 0 16px;

    border: none;

    border-radius: 10px;

    background:
        linear-gradient(
            135deg,
            #005596,
            #0875bd
        );

    color: #ffffff;

    font-family: inherit;

    font-size: 14px;

    font-weight: 700;

    line-height: 1;

    cursor: pointer;

    transition:
        transform .16s ease,
        box-shadow .16s ease,
        opacity .16s ease;
}


/* =====================================================
   LOGIN BUTTON HOVER
===================================================== */

.btn-login:hover {
    transform: translateY(-1px);

    box-shadow:
        0 10px 20px -8px
        rgba(0, 85, 150, .48);
}


/* =====================================================
   LOGIN BUTTON ACTIVE
===================================================== */

.btn-login:active {
    transform: translateY(0);

    box-shadow: none;
}


/* =====================================================
   LOGIN BUTTON FOCUS
===================================================== */

.btn-login:focus {
    outline: none;
}


/* =====================================================
   LOGIN BUTTON FOCUS VISIBLE
===================================================== */

.btn-login:focus-visible {
    outline: 2px solid #005596;

    outline-offset: 3px;
}


/* =====================================================
   LOGIN BUTTON DISABLED
===================================================== */

.btn-login:disabled {
    opacity: .65;

    cursor: not-allowed;

    transform: none;

    box-shadow: none;
}


/* =====================================================
   LOGIN FOOTER
===================================================== */

.login-footer {
    margin-top: 24px;

    text-align: center;

    color: #94a3b8;

    font-size: 11.5px;

    line-height: 1.5;
}

.login-footer p {
    margin: 0;
}

@keyframes login-glow-drift {
    0% {
        transform: translate3d(-2%, -1%, 0) scale(1);
    }

    100% {
        transform: translate3d(3%, 2%, 0) scale(1.08);
    }
}

@keyframes login-grid-drift {
    from {
        background-position: 0 0, 0 0, 0 0;
    }

    to {
        background-position: 58px 58px, 58px 58px, 220px 0;
    }
}

@keyframes login-card-enter {
    from {
        opacity: 0;
        transform: translateY(18px) scale(.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes login-logo-float {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes map-plot-draw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes map-route-flow {
    to {
        stroke-dashoffset: -220;
    }
}

@keyframes map-point-pulse {
    0%,
    100% {
        opacity: .85;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.45);
    }
}

@keyframes map-tag-float {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

@media (prefers-reduced-motion: reduce) {
    body::before,
    body::after,
    .login-card,
    .login-header .logo img,
    .map-plot,
    .map-route,
    .map-point,
    .map-tag {
        animation: none;
    }

    .map-plot {
        stroke-dashoffset: 0;
    }
}

/* Keep the two-column layout visible on desktop viewports reduced by OS scaling. */
@media (min-width: 981px) and (max-width: 1440px),
       (min-width: 981px) and (max-height: 800px) {
    .login-container {
        zoom: .75;
    }
}

@media (max-width: 980px) {
    .login-container {
        max-width: 460px;
        grid-template-columns: 1fr;
        gap: 0;
    }

    .login-showcase {
        display: none;
    }
}


/* =====================================================
   RESPONSIVE TABLET
===================================================== */

@media (max-width: 768px) {

    body {
        padding: 20px;
    }


    .login-container {
        max-width: 430px;
    }


    .login-card {
        padding: 32px;
    }

}


/* =====================================================
   RESPONSIVE MOBILE
===================================================== */

@media (max-width: 480px) {

    body {
        min-height: 100vh;

        padding: 16px;
    }


    .login-container {
        max-width: 100%;
    }

    .login-container::before,
    .login-container::after {
        display: none;
    }


    .login-card {
        padding: 28px 22px;

        border-radius: 16px;
    }


    .login-header {
        margin-bottom: 24px;
    }


    .login-header .logo {
        width: 52px;

        height: 52px;

        margin-bottom: 14px;
    }


    .login-header h1 {
        font-size: 21px;
    }


    .login-header p {
        font-size: 13px;
    }


    .form-group {
        margin-bottom: 17px;
    }


    .form-group label {
        font-size: 13px;
    }


    .form-group input {
        height: 46px;

        font-size: 14px;
    }


    .password-wrapper input {
        height: 46px;

        padding-right: 44px;
    }


    .toggle-password {
        right: 7px;

        width: 34px;

        height: 34px;
    }


    .btn-login {
        height: 46px;

        font-size: 14px;
    }

}


/* =====================================================
   VERY SMALL MOBILE
===================================================== */

@media (max-width: 360px) {

    body {
        padding: 12px;
    }


    .login-card {
        padding: 24px 18px;

        border-radius: 14px;
    }


    .login-header h1 {
        font-size: 20px;
    }


    .login-header p {
        font-size: 12.5px;
    }


    .form-group input {
        height: 44px;

        font-size: 13.5px;
    }


    .password-wrapper input {
        height: 44px;
    }


    .toggle-password {
        width: 32px;

        height: 32px;
    }


    .toggle-password svg {
        width: 19px;

        height: 19px;
    }


    .btn-login {
        height: 44px;

        font-size: 13.5px;
    }

}
