:root {
    --green: #315f47;
    --green-dark: #244a37;
    --green-soft: #e7f0e6;
    --yellow: #edcc69;
    --text: #263f32;
    --muted: #758579;
}

/* ==============================
   RESET
============================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.login-body {
    min-height: 100vh;
    min-height: 100dvh;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #fafbf9;
    color: var(--text);
}

.login-container {
    display: grid;
    grid-template-columns: 52% 48%;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ==============================
   ANIMASI BOLA-BOLA
============================== */

@keyframes float-a {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(14px, 18px);
    }
}

@keyframes float-b {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-16px, -14px);
    }
}

@keyframes float-c {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-14px);
    }
}

@keyframes pulse-soft {

    0%,
    100% {
        transform: scale(1);
        opacity: .9;
    }

    50% {
        transform: scale(1.18);
        opacity: 1;
    }
}

@keyframes drift-x {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(26px, -22px) scale(1.12);
    }

    66% {
        transform: translate(-18px, 20px) scale(.92);
    }
}

@keyframes rise {
    0% {
        transform: translateY(0) scale(1);
        opacity: .85;
    }

    50% {
        transform: translateY(-34px) scale(1.15);
        opacity: 1;
    }

    100% {
        transform: translateY(0) scale(1);
        opacity: .85;
    }
}

/* ==============================
   PANEL KIRI
============================== */

.left-panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;

    /* Susunan vertikal dipusatkan, jarak diatur oleh gap */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(16px, 3dvh, 34px);

    width: 100%;
    min-width: 0;
    padding: clamp(20px, 4dvh, 40px) clamp(20px, 2.5vw, 38px);

    background: linear-gradient(140deg, #edf3eb, #e1ebe0);
}

/* Bola hijau besar kiri atas */
.left-panel::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 240px;
    height: 240px;
    top: -140px;
    left: -130px;
    border-radius: 50%;
    background: #8eae92;
    animation: drift-x 9s ease-in-out infinite;
}

/* Bola hijau kiri bawah + bola kuning kecil */
.left-panel::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 280px;
    height: 170px;
    left: -110px;
    bottom: -95px;
    border-radius: 50%;
    background: #86a88c;
    box-shadow: 95px 5px 0 -35px var(--yellow);
    animation: drift-x 12s ease-in-out infinite reverse;
}

/* ==============================
   LOGO DAN IDENTITAS
============================== */

.brand {
    position: relative;
    z-index: 3;

    display: flex;
    align-items: center;
    justify-content: center;

    width: fit-content;
    max-width: 100%;
    gap: 22px;
    margin: 0;
}

/* Bola-bola animasi di sekitar logo */
.brand::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 70px;
    height: 70px;
    top: -45px;
    right: -120px;
    border-radius: 50%;
    background: rgba(134, 168, 140, .55);
    animation: rise 6s ease-in-out infinite;
}

.brand::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 22px;
    height: 22px;
    top: 80px;
    left: -110px;
    border-radius: 50%;
    background: var(--yellow);
    animation: rise 5s ease-in-out infinite -2s;
}

.brand-logo-wrap {
    position: relative;
    flex: 0 0 auto;
    width: clamp(88px, 15dvh, 144px);
    height: clamp(104px, 18dvh, 172px);
    overflow: hidden;
    background: transparent;
}

.brand-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-text h3 {
    margin: 0;
    color: #194c3c;
    font-size: clamp(21px, 2.2vw, 34px);
    font-weight: 750;
    line-height: 1.25;
}

.brand-text p {
    margin-top: 10px;
    color: #54745e;
    font-size: clamp(12px, 1.2vw, 18px);
    line-height: 1.5;
}

/* ==============================
   ILUSTRASI MESIN PREDIKSI
============================== */

.illustration {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;

    width: min(100%, 740px, 72dvh);
    aspect-ratio: 740 / 410;
    container-type: inline-size;
    margin: 0;
}

/* Garis putus-putus tipis di belakang ilustrasi */
.illustration::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 6.21622cqw 4.59459cqw 4.05405cqw;
    border: 0.20270cqw dashed rgba(190, 170, 90, .55);
    border-radius: 2.97297cqw;
}

/* Bola kuning kecil di dekat laptop */
.illustration::after {
    content: "";
    position: absolute;
    z-index: 0;
    width: 3.78378cqw;
    height: 3.78378cqw;
    top: 2.16216cqw;
    left: 44%;
    border-radius: 50%;
    background: var(--yellow);
    animation: pulse-soft 4s ease-in-out infinite;
}

/* LAPTOP */

.laptop {
    position: absolute;
    z-index: 1;
    width: 76%;
    left: 12%;
    top: 7.43243cqw;
}

.screen {
    width: 100%;
    height: 41.35135cqw;
    padding: 1.62162cqw;
    overflow: hidden;

    background: white;
    border: 0.94595cqw solid #244c42;
    border-bottom-width: 1.48649cqw;
    border-radius: 1.89189cqw 1.89189cqw 0.54054cqw 0.54054cqw;

    box-shadow: 0 1.21622cqw 2.70270cqw rgba(36, 72, 55, .12);
}

.screen-header {
    height: 2.56757cqw;
    display: flex;
    align-items: center;
    gap: 0.67568cqw;
    padding: 0 0.94595cqw;
    background: #8cbfa9;
}

.screen-header span {
    display: block;
    width: 0.94595cqw;
    height: 0.94595cqw;
    border-radius: 50%;
    background: white;
}

/* ISI LAYAR */

.screen-content {
    display: grid;
    grid-template-columns: minmax(0, 43fr) minmax(0, 57fr);
    gap: 1.21622cqw;

    height: 33.10811cqw;
    padding: 1.62162cqw;
    background: #f5f9f4;
}

/* PETA */

.screen-menu {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;

    border: 0.13514cqw solid #d6e4d7;
    border-radius: 0.94595cqw;
    background: #fbfdfb;
}

.screen-menu::before {
    content: "";
    display: block;
    width: 82%;
    height: 85%;
    background: #78a183;

    clip-path: polygon(37% 0, 60% 9%, 75% 23%, 90% 34%,
            82% 52%, 95% 70%, 73% 83%, 65% 100%,
            46% 89%, 30% 96%, 19% 74%, 4% 65%,
            15% 45%, 5% 25%, 27% 19%);
}

.screen-menu::after {
    content: "";
    position: absolute;
    width: 2.70270cqw;
    height: 2.70270cqw;
    left: 54%;
    top: 45%;
    border: 0.27027cqw solid white;
    border-radius: 50%;
    background: var(--yellow);
    animation: pulse-soft 3s ease-in-out infinite;
}

.screen-menu i {
    display: none;
}

/* GRAFIK BATANG */

.screen-chart {
    display: flex;
    flex-direction: column;
    gap: 1.08108cqw;
    min-width: 0;
}

.chart-title {
    width: 55%;
    height: 1.21622cqw;
    flex: 0 0 1.21622cqw;
    border-radius: 0.67568cqw;
    background: #cbdccf;
}

.bars {
    display: flex;
    flex: 1;
    align-items: end;
    justify-content: space-around;
    gap: 0.94595cqw;

    min-height: 8.78378cqw;
    padding: 1.08108cqw 1.35135cqw 0;

    border-bottom: 0.13514cqw solid #dce7dc;
    border-radius: 0.81081cqw;
    background: white;
}

.bars i {
    display: block;
    width: 15%;
    border-radius: 0.54054cqw 0.54054cqw 0 0;
    background: #739b7d;
}

.bars i:nth-child(1) {
    height: 40%;
}

.bars i:nth-child(2) {
    height: 65%;
    background: #e9c95b;
}

.bars i:nth-child(3) {
    height: 53%;
}

.bars i:nth-child(4) {
    height: 90%;
    background: #315f47;
}

.bars i:nth-child(5) {
    height: 72%;
    background: #e9c95b;
}

/* GRAFIK LINGKARAN */

.mini-analytics {
    display: flex;
    flex: 0 0 10.00000cqw;
    align-items: center;
    gap: 1.62162cqw;

    height: 10.00000cqw;
    padding: 0.94595cqw;
    border-radius: 0.81081cqw;
    background: white;
}

.donut {
    position: relative;
    flex: 0 0 6.48649cqw;
    width: 6.48649cqw;
    height: 6.48649cqw;
    border-radius: 50%;

    background: conic-gradient(#47795e 0 65%,
            #edcc69 65% 85%,
            #dce9dd 85%);
}

.donut::after {
    content: "";
    position: absolute;
    width: 2.56757cqw;
    height: 2.56757cqw;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: white;
}

.chart-lines {
    flex: 1;
    min-width: 0;
}

.chart-lines span {
    display: block;
    width: 85%;
    height: 0.67568cqw;
    margin: 0.67568cqw 0;
    border-radius: 0.67568cqw;
    background: #cbdccf;
}

/* DASAR LAPTOP */

.laptop-base {
    width: 110%;
    height: 1.48649cqw;
    margin-left: -5%;
    background: #9eb8a8;
    border-radius: 0.27027cqw 0.27027cqw 1.62162cqw 1.62162cqw;
}

/* KARTU MENGAMBANG */

.floating-box {
    position: absolute;
    z-index: 4;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0.13514cqw solid #d1e1d2;
    border-radius: 1.62162cqw;
    background: white;
    box-shadow: 0 0.67568cqw 2.02703cqw rgba(49, 91, 59, .10);
    animation: float-c 6s ease-in-out infinite;
}

.pest-box {
    top: 1.89189cqw;
    left: 0;
    width: 20.94595cqw;
    height: 11.62162cqw;
    gap: 1.62162cqw;
}

.mini-icon {
    display: grid;
    flex: 0 0 5.94595cqw;
    place-items: center;
    width: 5.94595cqw;
    height: 5.94595cqw;
    border-radius: 50%;
    background: #e5efe5;
    color: #38664b;
    font-size: 3.51351cqw;
}

.mini-lines {
    width: 55%;
}

.mini-lines span {
    display: block;
    height: 0.67568cqw;
    margin: 0.81081cqw 0;
    border-radius: 0.67568cqw;
    background: #cbdccf;
}

.graph-box {
    top: 1.89189cqw;
    right: 2%;
    width: 17.56757cqw;
    height: 12.43243cqw;
    padding: 1.89189cqw;
    animation-delay: -2s;
}

.graph-box svg {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
}

.database-box {
    right: 0;
    bottom: 4.59459cqw;
    width: 10.81081cqw;
    height: 14.05405cqw;
    color: #477b62;
    font-size: 5.94595cqw;
    animation-delay: -4s;
}

.gear-box {
    bottom: 4.59459cqw;
    left: 0;
    width: 10.81081cqw;
    height: 10.81081cqw;
    color: #477b62;
    font-size: 5.40541cqw;
    animation-delay: -3s;
}

.floating-info {
    display: none;
}

/* ==============================
   JUDUL PENELITIAN
============================== */

.system-description {
    position: relative;
    z-index: 3;

    width: 100%;
    max-width: 700px;
    margin: 0;

    padding: 0 5px;
    text-align: center;
}

.system-description::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 90px;
    height: 90px;
    left: -10px;
    bottom: -70px;
    border-radius: 50%;
    background: rgba(134, 168, 140, .45);
    animation: drift-x 10s ease-in-out infinite;
}

.system-description::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 36px;
    height: 36px;
    right: 20px;
    bottom: -60px;
    border-radius: 50%;
    background: var(--yellow);
    animation: rise 5.5s ease-in-out infinite -1s;
}

.system-description h1 {
    margin: 0;
    color: #194c3c;
    font-size: clamp(16px, 1.55vw, 24px);
    font-weight: 750;
    line-height: 1.5;
}

.system-description p {
    display: none;
}

/* =================================
   PANEL KANAN
================================= */

.right-panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-width: 0;
    gap: clamp(16px, 3dvh, 28px);
    padding: clamp(16px, 3dvh, 40px) clamp(20px, 2.3vw, 35px);

    background: #fbfcfa;
}

/* Bola kuning besar kanan bawah */
.right-panel::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 230px;
    height: 230px;
    right: -90px;
    bottom: -100px;
    border-radius: 50%;
    background: #f3dc8c;
    animation: float-b 10s ease-in-out infinite;
}

/* Bola hijau lembut kanan atas */
.right-panel::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 150px;
    height: 150px;
    top: -70px;
    right: -50px;
    border-radius: 50%;
    background: #dbe8da;
    animation: float-a 12s ease-in-out infinite;
}

/* KARTU LOGIN */

.login-card {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 510px;
    flex-shrink: 0;
    padding: clamp(20px, 4dvh, 42px) clamp(20px, 2.6vw, 40px);

    border: 1px solid #e2eae1;
    border-radius: 17px;
    background: white;
    box-shadow: 0 10px 28px rgba(40, 70, 48, .08);
}

/* JUDUL LOGIN */

.login-heading {
    margin-bottom: clamp(16px, 3dvh, 32px);
    text-align: center;
}

.login-symbol {
    display: flex;
    align-items: center;
    justify-content: center;

    width: clamp(48px, 7dvh, 65px);
    height: clamp(48px, 7dvh, 65px);
    margin: 0 auto clamp(8px, 1.5dvh, 16px);

    border-radius: 50%;
    background: #205742;
    color: white;
}

.login-symbol svg {
    display: block;
    width: 35px !important;
    height: 35px !important;
    max-width: 35px !important;
    fill: none !important;
    stroke: white;
    stroke-width: 1.7;
}

.login-heading h2 {
    margin: 0 0 8px;
    color: #163e32;
    font-size: 31px;
    font-weight: 750;
}

.login-heading p {
    color: #78877c;
    font-size: 15px;
}

/* FORM USERNAME DAN PASSWORD */

.form-group {
    margin-bottom: clamp(14px, 2.5dvh, 23px);
}

.form-group label {
    display: block;
    margin-bottom: 9px;
    color: #315b3b;
    font-size: 15px;
    font-weight: 700;
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 11px;

    width: 100%;
    height: clamp(44px, 6dvh, 53px);
    padding: 0 13px;

    border: 1px solid #dce4dd;
    border-radius: 9px;
    background: white;
}

.input-wrapper:focus-within {
    border-color: #72967b;
    box-shadow: 0 0 0 3px rgba(91, 137, 101, .10);
}

.input-wrapper>svg {
    display: block;
    flex: 0 0 21px;

    width: 21px !important;
    height: 21px !important;
    min-width: 21px;
    max-width: 21px;

    fill: none !important;
    stroke: #385e49;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.input-wrapper input {
    display: block;
    flex: 1;
    min-width: 0;
    width: 100%;
    height: 100%;
    padding: 0;

    border: 0;
    outline: 0;
    background: transparent;

    color: #263c2d;
    font-family: inherit;
    font-size: 16px;
}

.input-wrapper input:focus {
    border: 0;
    box-shadow: none;
}

.input-wrapper input::placeholder {
    color: #89988d;
}

/* TOMBOL LIHAT PASSWORD */

.show-password {
    display: flex;
    flex: 0 0 25px;
    align-items: center;
    justify-content: center;

    width: 25px;
    height: 30px;
    padding: 0;

    border: 0;
    background: transparent;
    color: #587461;
    cursor: pointer;
}

.show-password svg {
    display: block;
    width: 20px !important;
    height: 20px !important;
    fill: none !important;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* TOMBOL MASUK */

.login-button {
    display: block;
    width: 100%;
    height: clamp(44px, 6dvh, 53px);
    margin-top: 5px;

    border: 0;
    border-radius: 9px;
    background: #315f47;

    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease;
}

.login-button:hover {
    background: #244a37;
}

.login-button:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 2px;
}

.login-button span {
    margin-left: 9px;
    color: #edcc69;
}

/* INFORMASI LOGIN */

.login-note {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: clamp(14px, 2.5dvh, 24px);
    padding: clamp(10px, 1.5dvh, 14px);

    border-radius: 9px;
    background: #edf3ed;

    color: #637769;
    font-size: 12px;
    line-height: 1.6;
}

.login-note span {
    flex: 0 0 auto;
    color: #315f47;
    font-size: 18px;
}

/* PESAN KESALAHAN */

.login-error,
.alert.error {
    margin-bottom: 18px;
    padding: 12px;
    border: 1px solid #f0d3cb;
    border-radius: 8px;
    background: #fff0eb;
    color: #a94d35;
    font-size: 13px;
}

/* FOOTER */

.footer-text {
    position: relative;
    color: #89958b;
    font-size: 12px;
    text-align: center;
}

/* =================================
   TABLET
================================= */

@media (max-width: 1050px) and (min-width: 761px) {
    .login-container {
        grid-template-columns: 48% 52%;
    }

    .brand {
        gap: 12px;
    }

    .brand-text h3 {
        font-size: 21px;
    }

    .brand-text p {
        font-size: 12px;
    }

}

/* Layar pendek: ringkas teks tanpa mengubah proporsi ilustrasi. */
@media (min-width: 761px) and (max-height: 700px) {
    .brand-text h3 {
        font-size: 22px;
    }

    .system-description h1 {
        font-size: 16px;
    }

    .login-heading h2 {
        font-size: 27px;
    }
}

/* HP dan tablet potret: identitas ringkas, form langsung terlihat. */
@media (max-width: 760px) {
    .login-container {
        display: flex;
        flex-direction: column;
    }

    .left-panel {
        flex: 0 0 auto;
        padding: 16px 20px;
    }

    .brand {
        gap: 12px;
    }

    .brand-logo-wrap {
        width: 72px;
        height: 86px;
    }

    .brand-text h3 {
        font-size: clamp(17px, 4.5vw, 23px);
    }

    .brand-text p {
        margin-top: 4px;
        font-size: 12px;
    }

    .illustration,
    .system-description {
        display: none;
    }

    .right-panel {
        flex: 1;
        padding: 16px;
        gap: 16px;
    }

    .login-card {
        max-width: 450px;
        padding: 20px;
    }

    .login-heading h2 {
        font-size: 27px;
    }

    .login-note {
        font-size: 12px;
    }

    .footer-text {
        font-size: 12px;
    }
}
/* Hormati pengaturan "kurangi gerakan" */
@media (prefers-reduced-motion: reduce) {

    .brand::before,
    .brand::after,
    .system-description::before,
    .system-description::after,
    .left-panel::before,
    .left-panel::after,
    .right-panel::before,
    .right-panel::after,
    .illustration::after,
    .screen-menu::after,
    .floating-box {
        animation: none;
    }
}
