/* ======= GLOBAL ======= */
body {
    background: linear-gradient(to right, #0f7a4d, #b7d0c0);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
}

/* ======= CARD LOGIN ======= */
.login-container {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: flex;
    width: 800px;
    max-width: 95%;
    transition: box-shadow 0.3s ease;
}

.login-container:hover {
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.35);
}

/* ======= FORM BAGIAN KANAN ======= */
.login-form {
    flex: 1;
    padding: 70px 60px;
}

/* ======= GAMBAR BAGIAN KIRI ======= */
.login-image {
    flex: 1.2;
    position: relative;
    background: url('/sawit.webp') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-top-left-radius: 120px;
    border-bottom-left-radius: 120px;
    overflow: hidden;
}

/* Overlay hijau transparan */
.login-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(15, 122, 77, 0.45);
}

/* Tulisan di tengah gambar */
.login-image .overlay-text {
    position: relative;
    text-align: center;
    z-index: 1;
}

.login-image h2 {
    font-weight: 700;
    font-size: 2rem;
}

.login-image p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ======= FORM INPUT ======= */
.form-group {
    position: relative;
    margin-bottom: 10px;
    /* beri ruang default di bawah */
}

.form-group:has(.error-text) {
    margin-bottom: 40px;
}


.form-group i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 0.95rem;
    pointer-events: none;
}

/* Input field */
.form-control {
    border-radius: 10px;
    background-color: #e8e8e8;
    border: none;
    padding: 12px 15px 12px 40px;
    /* jarak kiri agar tidak nabrak ikon */
    font-size: 0.9rem;
    line-height: 1.5;
}

.form-control:focus {
    background-color: #e8e8e8;
    box-shadow: none;
}

.form-control::placeholder {
    color: #b9b8b8;
    font-size: 0.9rem;
}

/* ======= LOGO ======= */
.login-logo {
    width: 90px;
    height: auto;
    margin-bottom: 10px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@media (max-width: 576px) {
    .login-logo {
        width: 70px;
    }
}

/* ======= BUTTON ======= */
.btn-login {
    background-color: #0f7a4d;
    color: white;
    border-radius: 10px;
    width: 100%;
    padding: 10px;
    font-weight: 600;
    border: none;
    transition: 0.3s;
}

.btn-login:hover {
    background-color: #0d6841;
}

/* ======= PESAN ERROR / SUKSES ======= */
.error-text {
    color: #dc3545;
    font-size: 0.85rem;
    text-align: left;
    position: absolute;
    bottom: -25px;
    /* muncul tepat di bawah input */
    line-height: 1.2;
    margin: 0;
}

.alert-success {
    font-size: 0.9rem;
    padding: 6px 10px;
    margin-bottom: 12px;
    border-radius: 4px;
}

/* ======= FORGOT PASSWORD ======= */
.forgot {
    text-align: right;
    font-size: 0.8rem;
    margin-top: -10px;
}

.forgot a {
    color: #888;
}

.forgot a:hover {
    text-decoration: underline;
    font-weight: 500;
}

/* ======= RESET PASSWORD PAGE ======= */
.reset {
    background: linear-gradient(to left, #0f7a4d, #b7d0c0);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
}

.reset-image {
    flex: 1.2;
    position: relative;
    background: url('/sawit.webp') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-top-right-radius: 120px;
    border-bottom-right-radius: 120px;
    overflow: hidden;
}

.reset-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(15, 122, 77, 0.45);
}

.reset-image .overlay-text {
    position: relative;
    text-align: center;
    z-index: 1;
}

.reset-image h2 {
    font-weight: 700;
    font-size: 2rem;
}

.reset-image p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ======= LINK KEMBALI KE LOGIN ======= */
.back-login {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    margin-top: 10px;
}

.back-login a {
    color: #0f7a4d;
}

.back-login a:hover {
    text-decoration: underline;
    font-weight: 500;
}

/* Pastikan wrapper relative */
.position-relative {
    position: relative;
}

/* Pastikan parent relative */
.form-group.position-relative {
    position: relative;
}

/* Padding kanan lebih lega supaya ikon tidak menutupi teks */
.password-input {
    padding-right: 3rem;
    /* bisa ditambah jika perlu */
}

/* Ikon mata */
.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    cursor: pointer;
    color: #555;
    width: 2.2rem;
    /* tambah area klik */
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.position-relative {
    position: relative;
}

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

.forgot a, .back-login a {
    text-decoration: none !important;
}
.forgot a:hover, .back-login a:hover {
    text-decoration: none !important;
}