* {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: Arial, sans-serif;
    }

    html {
      width: 100%;
      min-height: 100%;
      overflow-x: hidden;
      -webkit-text-size-adjust: 100%;
      text-size-adjust: 100%;
      scrollbar-width: none;
    }

    html::-webkit-scrollbar,
    body::-webkit-scrollbar,
    .card-body::-webkit-scrollbar {
      display: none;
      width: 0;
      height: 0;
    }

    /* BACKGROUND (bisa diganti gambar nanti) */
    body {
      min-height: 100vh;
      min-height: 100dvh;
      width: 100%;
      display: flex;
      flex-direction: column;   /* 🔥 INI KUNCINYA */
      justify-content: center;
      align-items: center;      /* tetap tengah horizontal */
      padding: clamp(16px, 4vh, 40px) 0;
      background: linear-gradient(135deg, #2e7d32, #4caf50, #66bb6a);
      position: relative;
      overflow-x: hidden;
      overflow-y: auto;
      scrollbar-width: none;
    }

    body::before {
      content: "";
      position: absolute;
      bottom: 0;
      width: 100%;
      height: 200px;
      background: rgba(255,255,255,0.1);
      border-radius: 50% 50% 0 0;
    }

    body::after {
      content: "";
      position: absolute;
      width: 300px;
      height: 300px;
      background: rgba(255,255,255,0.08);
      border-radius: 50%;
      top: 10%;
      left: 10%;
    }

    body::before,
    body::after,
    .circle {
      pointer-events: none;
    }

    .login-card,
    .footer {
      position: relative;
      z-index: 1;
    }

    /* CARD LOGIN */
    .login-card {
      width: 90%;
      max-width: 400px;
      padding-bottom: 10px;
      background: white;
      border-radius: 20px;
      overflow: hidden;
      box-shadow: 0 5px 15px rgba(0,0,0,0.2);
      animation: cardPop 0.7s ease-out;
      display: flex;
      flex-direction: column;
    }

    /* PANEL DESKTOP (default disembunyikan) */
    .card-side{
        display:none;
    }

    .card-content{
        width:100%;
    }

    /* HEADER */
    .card-header {
      background: #a5d6a7;
      padding: 40px 20px; /* lebih tinggi */
      text-align: center;
      color: white;
    }

    .card-header img {
      width: 80px;
      margin-bottom: 10px;
    }

    .card-header h2 {
      font-size: 30px;
      font-weight: bold;
      color: #ffffff;
    }

    /* BODY */
    .card-body {
      padding: 30px;         /* normal saja */
      min-height: 350px;     /* ini yang bikin tinggi */
      display: flex;
      flex-direction: column;
      justify-content: center; /* biar isi tetap di tengah */
      text-align: center;
      padding: 30px;
      display: flex;
      flex-direction: column;
      align-items: center;
      overflow-y: auto;
      scrollbar-width: none;
    }

    .text-area {
      display: inline-block; /* biar lebarnya ikut teks */
      margin-bottom: 20px;
      text-align: center;
    }

    .form-area {
      display: flex;
      flex-direction: column;
      align-items: center; /* center */
    }

    /* samakan lebar input & button dengan text */
    .input-group,
    .btn-login {
      width: 100%;
      max-width: 280px; /* sesuaikan dengan lebar teks */
    }

    .card-body h3 {
      margin-bottom: 5px;
      color: #2e7d32;
    }

    .card-body p {
      font-size: 13px;
      color: #666;
      margin-bottom: 20px;
    }

    .text-area {
      margin-bottom: 20px;
      transform: translateY(-20px); /* geser ke atas */
    }

    form {
      display: flex;
      flex-direction: column;
      align-items: center;
      transform: translateY(-20px); /* naikkan sedikit */
    }

    /* INPUT */
    .input-group {
      position: relative;
      margin-bottom: 15px;
      width: 100%;
      max-width: 280px;
    }

    .input-group i:not(.toggle-password) {
      position: absolute;
      left: 10px;
      top: 50%;
      transform: translateY(-50%);
      color: #777;
    }

    .input-group input {
      width: 100%;
      padding: 10px;
      padding-left: 35px;
      padding-right: 35px;
      border-radius: 8px;
      border: 1px solid #ccc;
      outline: none;
      transition: 0.3s;
      font-size: 16px;
    }

    .toggle-password {
      position: absolute;
      right: 10px;
      top: 50%;
      transform: translateY(-50%);
      cursor: pointer;
      color: #777;
    }

    .input-group input:focus {
      border-color: #2e7d32;
      box-shadow: 0 0 5px rgba(46,125,50,0.3);
    }

    /* BUTTON */
    .btn-login {
      width: 100%;
      padding: 10px;
      background: #2e7d32;
      color: white;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      font-weight: bold;
      transition: 0.3s;
    }

    .btn-login:hover {
      background: #1b5e20;
    }

    /* LABEL INPUT */
    .input-label {
      display: block;
      text-align: left;
      width: 100%;
      max-width: 280px;
      font-size: 12px;
      color: #2e7d32;
      font-weight: bold;
      margin-bottom: 5px;
      margin-top: 5px;
    }

    .extra-links {
      margin-top: 10px;
      font-size: 12px;
      text-align: center;
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 4px 8px;
      position: relative;
      z-index: 2;
    }

    .extra-links p {
      font-size: 12px;
      color: #666;
      flex-basis: 100%;
      margin: 0;
    }

    .extra-links a {
      color: #2196f3;
      text-decoration: none;
      font-weight: bold;
      display: inline-flex;
      align-items: center;
      min-height: 32px;
      padding: 4px 6px;
      margin-top: 2px;
    }

    .extra-links a:hover {
      text-decoration: underline;
    }

    /* MODAL BACKGROUND */
    .modal {
      position: fixed;
      z-index: 999;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;

      display: flex;
      justify-content: center;
      align-items: flex-start; /* 🔥 naik ke atas */

      padding-top: 80px; /* 🔥 posisi lebih ke atas */
      background: rgba(0,0,0,0.5);

      opacity: 0;
      visibility: hidden;
      transition: 0.25s ease;
      pointer-events: none;
    }

    /* ketika aktif */
    .modal.show {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }

    .portal-badge {
      display: inline-flex;
      align-items: center;
      width: fit-content;
      margin: 0 auto 16px;
      padding: 7px 12px;
      border-radius: 999px;
      background: rgba(46, 125, 50, 0.12);
      color: #1b5e20;
      border: 1px solid rgba(46, 125, 50, 0.25);
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .mobile-badge {
      margin-bottom: 10px;
    }

    /* MODAL BOX */
    .modal-content {
      background: #fff;
      padding: 20px;
      width: 90%;
      max-width: 400px;
      border-radius: 10px;
      text-align: center;
      position: relative;

      transform: scale(0.8);
      opacity: 0;
      transition: 0.25s ease;
    }

    /* animasi muncul */
    .modal.show .modal-content {
      transform: scale(1);
      opacity: 1;
    }

    /* TOMBOL X */
    .close-modal {
      position: absolute;
      top: 10px;
      right: 15px;
      font-size: 20px;
      cursor: pointer;
    }

    /* GAMBAR */
    .modal-img {
      width: 100%;
      margin-top: 15px;
      border-radius: 8px;
    }

    .circle {
      position: absolute;
      border-radius: 50%;
      background: rgba(255,255,255,0.08);
      backdrop-filter: blur(2px);
      animation: floatUp linear infinite;
    }

    .c1 {
      width: 120px;
      height: 120px;
      left: 10%;
      bottom: -100px;
      animation-duration: 6s;
    }

    .c2 {
      width: 80px;
      height: 80px;
      left: 30%;
      bottom: -120px;
      animation-duration: 8s;
    }

    .c3 {
      width: 150px;
      height: 150px;
      right: 15%;
      bottom: -150px;
      animation-duration: 10s;
    }

    .c4 {
      width: 100px;
      height: 100px;
      right: 40%;
      bottom: -100px;
      animation-duration: 7s;
    }

    .footer {
      text-align: center;
      font-size: 12px;
      color: #000000; /* lebih terang */
      font-weight: bold;
      margin-top: 15px;
      margin-bottom: auto;
    }

    /* ANIMASI */
    @keyframes floatUp {
      0% {
        transform: translateY(0);
        opacity: 0.6;
      }
      100% {
        transform: translateY(-120vh); /* naik ke atas layar */
        opacity: 0;
      }
    }

    @keyframes cardPop {
      0% {
        opacity: 0;
        transform: translateY(40px);
      }
      100% {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .login-card,
      .circle {
        animation: none !important;
      }
    }

    /* =========================
   DESKTOP / LAPTOP
========================= */
@media (min-width:992px){

    .login-card{
        max-width:1100px;
        height:min(650px, calc(100dvh - 100px));
        min-height:520px;
        display:flex;
        flex-direction:row;
        padding-bottom:0;
    }

    /* Panel kiri */
    .card-side{
        display:flex;
        width:38%;
        background:rgba(171,244,174,.7);
        flex-direction:column;
        justify-content:center;
        align-items:center;
        text-align:center;
        padding:70px 50px;
    }

    .card-side img{
        width:140px;
        margin-bottom:25px;
    }

    .card-side h2{
        color:#2e7d32;
        font-size:32px;
        margin-bottom:15px;
    }

    .card-side p{
        color:#4e4e4e;
        font-size:15px;
        line-height:1.8;
        max-width:300px;
    }

    .card-side .portal-badge {
        margin: 0 0 18px;
    }

    .mobile-badge {
        display: none;
    }

    /* Panel kanan */
    .card-content{
        width:62%;
    }

    /* Header HP disembunyikan */
    .card-header{
        display:none;
    }

    .card-body{
        min-height:100%;
        justify-content:center;
        align-items:flex-start;
        padding:50px 60px;
        text-align:left;
    }

    .text-area{
        width:100%;
        transform:none;
        margin-bottom:25px;
    }

    form{
        width:100%;
        align-items:flex-start;
        transform:none;
    }

    .input-label,
    .input-group,
    .btn-login{
        width:100%;
        max-width:100%;
    }

    .extra-links{
        width:100%;
        text-align:center;
        margin-top:20px;
    }

    .footer{
        margin-top:15px;
        flex-shrink:0;
    }

}

@media (min-width: 992px) and (max-height: 620px) {
    body { justify-content: flex-start; }
    .login-card { min-height: 520px; }
}
