/* ===========================================================
   CSS Reset & Base
============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Poppins", sans-serif;
    background: #f0f4f0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

a {
    text-decoration: none;
}

/* ===========================================================
   Hero & Layout — Green Premium
============================================================ */
.hero-wrap {
   background: linear-gradient(
    135deg,
    #061C14 0%,
    #0B3D2E 45%,
    #145A43 100%
);
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
}

.hero-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at 30% 50%,
        rgba(26, 107, 74, 0.3) 0%,
        transparent 70%
    );
    pointer-events: none;
}

.hero-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at 70% 50%,
        rgba(45, 143, 100, 0.2) 0%,
        transparent 60%
    );
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
}

/* ===========================================================
   Logo Premium — TANPA SEMUA EFEK CARD (termasuk glossy)
============================================================ */
.logo-premium {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
    position: relative;
}

.logo-image-wrapper {
    position: relative;
    width: 220px;
    height: 220px;
    flex-shrink: 0;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* HAPUS SEMUA: border-radius, overflow, box-shadow */
}

.logo-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.5s ease;
    /* HAPUS: filter, mix-blend-mode */
}

.logo-image-wrapper:hover {
    transform: translateY(-3px) scale(1.02);
    /* HAPUS: box-shadow */
}

.logo-image-wrapper:hover img {
    transform: scale(1.05);
}

/* ============================================================
   HILANGKAN EFEK GLOSSY (::before)
   ============================================================ */
.logo-image-wrapper::before {
    display: none !important; /* HILANGKAN TOTAL efek glossy */
}

/* ===========================================================
   Welcome Text — Premium Style
============================================================ */
.welcome-heading {
    font-size: 3rem;
    font-weight: 200;
    line-height: 1.15;
    letter-spacing: -0.5px;
    color: #ffffff;
    margin-bottom: 0.5rem;
    text-align: center;
}

.welcome-heading .brand-name {
    display: inline-block;
    font-weight: 700;
    position: relative;
    z-index: 0;
    padding: 0 4px;
    cursor: default;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    color: #ffffff;
}

.welcome-heading .brand-name .text-inner {
    position: relative;
    z-index: 2;
    background: linear-gradient(
        135deg,
        #ffffff 0%,
        #a8e6cf 40%,
        #55c992 70%,
        #ffffff 100%
    );
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease-in-out infinite;
    text-shadow: 0 0 40px rgba(85, 201, 146, 0.1);
}

@keyframes gradientShift {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.welcome-heading .brand-name .shimmer-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #55c992, transparent);
    transition: width 0.8s ease;
    z-index: 3;
    border-radius: 2px;
}

.welcome-heading .brand-name:hover .shimmer-line {
    width: 100%;
}

.welcome-sub {
    font-weight: 300;
    opacity: 0.85;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 460px;
    margin: 0.5rem auto 0.5rem auto;
    line-height: 1;
    letter-spacing: 0.3px;
    text-align: center;
}

.info-tags {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.4);
    justify-content: center;
    flex-wrap: wrap;
}

.left-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* ===========================================================
   Card & Form — smaller border-radius (6px)
============================================================ */
.card-elegant {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 6px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.25),
        0 10px 30px rgba(26, 107, 74, 0.15);
    padding: 40px 35px;
    position: relative;
    overflow: hidden;
    border: none;
    backdrop-filter: blur(10px);
}

.card-elegant::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1a6b4a, #55c992, #1a6b4a);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%,
    100% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 100% 0%;
    }
}

/* ===========================================================
   INPUT DAN ICON (PERBAIKAN FINAL DENGAN FLEXBOX & POSITION)
============================================================ */
.input-group-elegant {
    position: relative;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center; /* PENTING: Ini menjaga ikon & input tetap di tengah */
}

.icon-elegant {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aab9a;
    font-size: 1.1rem;
    z-index: 3;
    pointer-events: none;
    transition: color 0.3s ease;
}

.input-group-elegant:focus-within .icon-elegant {
    color: #1a6b4a;
}

.form-control-elegant {
    border: 2px solid #e8ede8;
    border-radius: 6px;
    padding: 12px 20px 12px 48px;
    font-size: 0.95rem;
    background: #f8faf8;
    transition: all 0.3s ease;
    height: 52px;
    width: 100%;
    color: #1a2e24;
    outline: none;
    font-family: inherit;
}

.form-control-elegant:focus {
    border-color: #1a6b4a;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(26, 107, 74, 0.08);
}

.form-control-elegant::placeholder {
    color: #9aab9a;
    font-weight: 300;
}

.form-control-elegant.is-invalid {
    border-color: #dc3545;
}

/* Posisi error message di bawah input (TIDAK MENDORONG IKON) */
.invalid-feedback {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 6px;
    position: absolute; /* PENTING: Agar pesan error mengapung dan tidak mendorong input */
    top: 100%;
    left: 0;
}

/* ===========================================================
   PASSWORD TOGGLE
============================================================ */
.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #9aab9a;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    z-index: 5;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #1a6b4a;
}

/* ===========================================================
   TOMBOL LOGIN
============================================================ */
.btn-elegant {
    background: linear-gradient(135deg, #1a6b4a, #0a2e1f);
    border: none;
    border-radius: 6px;
    padding: 14px 30px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(26, 107, 74, 0.35);
    height: 52px;
    font-size: 1rem;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn-elegant::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.08),
        transparent
    );
    transition: left 0.6s ease;
}

.btn-elegant:hover::before {
    left: 100%;
}

.btn-elegant:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(26, 107, 74, 0.45);
    background: linear-gradient(135deg, #2d8f64, #1a6b4a);
}

.btn-elegant:active {
    transform: translateY(0);
}

/* ===========================================================
   CAPTCHA Styling
============================================================ */
.captcha-wrapper {
    margin-bottom: 1rem;
}

.captcha-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8faf8;
    border-radius: 6px;
    padding: 8px 12px;
    border: 2px solid #e8ede8;
    transition: all 0.3s ease;
}

.captcha-container:focus-within {
    border-color: #1a6b4a;
    box-shadow: 0 0 0 4px rgba(26, 107, 74, 0.08);
}

.captcha-image-wrapper {
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #d4dfd4;
    transition: all 0.3s ease;
    line-height: 0;
    min-width: 120px;
    min-height: 44px;
    background: #f0f4f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.captcha-image-wrapper img {
    height: 44px;
    width: auto;
    display: block;
    border-radius: 4px;
}

.captcha-image-wrapper .refresh-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 4px;
}

.captcha-image-wrapper:hover .refresh-overlay {
    opacity: 1;
}

.captcha-image-wrapper .refresh-overlay i {
    color: #fff;
    font-size: 20px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.captcha-input-wrapper {
    flex: 1;
    position: relative;
}

.captcha-input-wrapper .icon-elegant {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aab9a;
    font-size: 1rem;
    z-index: 3;
    pointer-events: none;
    transition: color 0.3s ease;
}

.captcha-input-wrapper:focus-within .icon-elegant {
    color: #1a6b4a;
}

.captcha-input-wrapper input {
    border: none;
    background: transparent;
    padding: 10px 12px 10px 36px;
    font-size: 0.95rem;
    width: 100%;
    color: #1a2e24;
    outline: none;
    font-family: inherit;
    letter-spacing: 1px;
}

.captcha-input-wrapper input::placeholder {
    color: #9aab9a;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.captcha-refresh-btn {
    flex-shrink: 0;
    background: transparent;
    border: 1px solid #d4dfd4;
    border-radius: 4px;
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #7a9a7a;
    font-size: 16px;
    line-height: 1;
}

.captcha-refresh-btn:hover {
    background: #1a6b4a;
    border-color: #1a6b4a;
    color: #fff;
    transform: rotate(90deg);
}

.captcha-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.captcha-hint {
    font-size: 0.75rem;
    color: #9aab9a;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===========================================================
   Alert Styling
============================================================ */
.alert-custom {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.alert-custom.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-custom.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* ===========================================================
   Copyright & Links
============================================================ */
.copyright-text {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    font-weight: 300;
    text-align: center;
    margin-top: 1.5rem;
    letter-spacing: 1px;
}

.copyright-text a {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.3s;
}

.copyright-text a:hover {
    opacity: 1;
    color: #ffffff;
}

.forgot-link {
    color: #7a9a7a;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    border-bottom: 1px solid transparent;
}

.forgot-link:hover {
    color: #1a6b4a;
    border-bottom-color: #1a6b4a;
}

/* ===========================================================
   Decorative
============================================================ */
.deco-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(85, 201, 146, 0.05);
    pointer-events: none;
}

.deco-circle-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
}

.deco-circle-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: -50px;
    background: rgba(85, 201, 146, 0.03);
}

/* ===========================================================
   Responsive
============================================================ */
@media (max-width: 768px) {
    .welcome-heading {
        font-size: 2.2rem;
    }
    .card-elegant {
        padding: 28px 20px;
    }
    .hero-wrap {
        padding: 1.5rem 0.75rem;
    }
    .logo-image-wrapper {
        width: 220px;
        height: 220px;
    }
    .logo-image-wrapper {
        width: 220px !important; /* Tambahkan !important */
        height: 220px !important; /* Tambahkan !important */
        max-width: 100% !important; /* Pastikan tidak terbatas */
    }
    .logo-name {
        font-size: 1.4rem;
    }
}

/* ===========================================================
   CAPTCHA MOBILE - CAPTCHA + REFRESH ATAS, INPUT BAWAH
=========================================================== */
/* ===========================================================
   MOBILE RESPONSIVE
   CAPTCHA:
   BARIS 1 = IMAGE + REFRESH
   BARIS 2 = INPUT FULL WIDTH
============================================================ */
@media (max-width: 576px) {

    /* -------------------------------------------------------
       HERO
    ------------------------------------------------------- */
    .hero-wrap {
        min-height: 100vh;
        width: 100%;
        padding: 20px 12px;
        align-items: center;
        justify-content: center;
    }

    .hero-content {
        width: 100%;
        max-width: 100%;
    }

    /* -------------------------------------------------------
       WELCOME
    ------------------------------------------------------- */
    .welcome-heading {
        font-size: 1.55rem;
        line-height: 1.2;
        margin-bottom: 6px;
    }

    .welcome-sub {
        font-size: 0.85rem;
        line-height: 1.35;
        margin-top: 4px;
        padding: 0 10px;
    }

    .info-tags {
        font-size: 0.65rem;
        letter-spacing: 1.2px;
        gap: 6px;
    }

    /* -------------------------------------------------------
       CARD
    ------------------------------------------------------- */
    .card-elegant {
        width: 100%;
        max-width: 360px;
        margin: 0 auto;
        padding: 24px 20px 22px;
        border-radius: 8px;
    }

    /* -------------------------------------------------------
       INPUT USERNAME / PASSWORD
    ------------------------------------------------------- */
    .input-group-elegant {
        width: 100%;
        margin-bottom: 16px;
    }

    .form-control-elegant {
        width: 100%;
        height: 48px;
        padding: 10px 44px 10px 44px;
        font-size: 0.9rem;
        border-radius: 6px;
    }

    .icon-elegant {
        left: 14px;
        font-size: 1rem;
    }

    .password-toggle {
        right: 14px;
        font-size: 1rem;
    }

    /* -------------------------------------------------------
       CAPTCHA CONTAINER
    ------------------------------------------------------- */
    .captcha-wrapper {
        width: 100%;
        margin-bottom: 16px;
    }

    .captcha-container {
        position: relative;

        width: 100%;
        padding: 8px;

        display: grid;

        /*
         * Kolom pertama = CAPTCHA
         * Kolom kedua = tombol refresh
         */
        grid-template-columns: minmax(0, 1fr) 38px;

        grid-template-rows: 44px 44px;

        column-gap: 8px;
        row-gap: 8px;

        align-items: center;

        background: #f8faf8;
        border: 2px solid #e8ede8;
        border-radius: 7px;

        box-sizing: border-box;
    }

    /* -------------------------------------------------------
       CAPTCHA IMAGE
    ------------------------------------------------------- */
    .captcha-image-wrapper {
        position: relative;

        grid-column: 1;
        grid-row: 1;

        width: 100%;
        min-width: 0;
        height: 44px;
        min-height: 44px;
        max-height: 44px;

        margin: 0;

        display: flex;
        align-items: center;
        justify-content: center;

        border: 1px solid #d4dfd4;
        border-radius: 5px;

        background: #f0f4f0;

        overflow: hidden;
        box-sizing: border-box;
    }

    .captcha-image-wrapper img {
        display: block;

        width: 100%;
        height: 44px;

        max-width: 100%;
        max-height: 44px;

        object-fit: fill;

        margin: 0;
        padding: 0;

        border-radius: 4px;
    }

    /* Hilangkan overlay hover di mobile */
    .captcha-image-wrapper .refresh-overlay {
        display: none;
    }

    /* -------------------------------------------------------
       REFRESH BUTTON
    ------------------------------------------------------- */
    .captcha-refresh-btn {
        position: static !important;

        grid-column: 2;
        grid-row: 1;

        width: 38px !important;
        min-width: 38px !important;
        max-width: 38px !important;

        height: 44px !important;
        min-height: 44px !important;
        max-height: 44px !important;

        margin: 0 !important;
        padding: 0 !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        flex: none !important;

        border: 1px solid #d4dfd4;
        border-radius: 5px;

        background: #ffffff;

        color: #1a6b4a;

        font-size: 17px;
        line-height: 1;

        box-sizing: border-box;

        transform: none !important;
    }

    .captcha-refresh-btn:hover {
        background: #1a6b4a;
        border-color: #1a6b4a;
        color: #ffffff;

        transform: none !important;
    }

    .captcha-refresh-btn:active {
        transform: scale(0.95) !important;
    }

    /* -------------------------------------------------------
       CAPTCHA INPUT
    ------------------------------------------------------- */
    .captcha-input-wrapper {
        position: relative;

        grid-column: 1 / -1;
        grid-row: 2;

        width: 100%;
        min-width: 0;
        height: 44px;

        box-sizing: border-box;
    }

    .captcha-input-wrapper .icon-elegant {
        position: absolute;

        left: 12px;
        top: 50%;

        transform: translateY(-50%);

        font-size: 0.95rem;

        z-index: 3;
    }

    .captcha-input-wrapper input {
        width: 100%;
        height: 44px;

        min-width: 0;

        padding: 9px 12px 9px 36px;

        font-size: 14px;
        letter-spacing: 1px;

        border: 0;
        outline: none;

        background: transparent;

        box-sizing: border-box;
    }

    .captcha-input-wrapper input::placeholder {
        font-size: 13px;
        letter-spacing: 0;
    }

    /* -------------------------------------------------------
       CAPTCHA HINT
    ------------------------------------------------------- */
    .captcha-hint {
        margin-top: 7px;

        font-size: 0.68rem;
        line-height: 1.35;

        gap: 5px;

        align-items: flex-start;
    }

    .captcha-hint i {
        margin-top: 2px;
        flex-shrink: 0;
    }

    /* -------------------------------------------------------
       REMEMBER ME
    ------------------------------------------------------- */
    .form-check {
        margin-bottom: 14px !important;
    }

    .form-check-label {
        font-size: 0.85rem;
    }

    /* -------------------------------------------------------
       LOGIN BUTTON
    ------------------------------------------------------- */
    .btn-elegant {
        width: 100%;
        height: 48px;

        padding: 12px 20px;

        font-size: 0.9rem;

        border-radius: 6px;
    }

    /* -------------------------------------------------------
       COPYRIGHT
    ------------------------------------------------------- */
    .copyright-text {
        font-size: 0.68rem;
        line-height: 1.4;
        margin-top: 1rem;
        padding: 0 10px;
    }
}


/* ===========================================================
   EXTRA SMALL DEVICE
   iPhone SE / 320px - 360px
============================================================ */
@media (max-width: 360px) {

    .hero-wrap {
        padding: 15px 8px;
    }

    .card-elegant {
        max-width: 100%;
        padding: 20px 16px;
    }

    .welcome-heading {
        font-size: 1.4rem;
    }

    .welcome-sub {
        font-size: 0.78rem;
    }

    .captcha-container {
        grid-template-columns: minmax(0, 1fr) 36px;
        column-gap: 6px;
    }

    .captcha-refresh-btn {
        width: 36px !important;
        min-width: 36px !important;
        max-width: 36px !important;
    }

    .captcha-input-wrapper input {
        font-size: 13px;
    }

    .captcha-input-wrapper input::placeholder {
        font-size: 12px;
    }
}


/* ===========================================================
   Hide unwanted elements
============================================================ */
.preloader,
#styles-switcher {
    display: none !important;
}
