body {
    font-family: Arial, sans-serif;
    background: #121212;
    color: #ffffff;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    position: relative;
    /* Tambahkan ini */
    overflow: hidden;
    /* Hindari elemen lain keluar */
}

.card {
    background: #1e1e1e;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    padding: 30px;
    max-width: 400px;
    width: 100%;
    backdrop-filter: blur(10px);
    /* Efek blur agar terlihat modern */
}

.logo-img {
    text-align: center;
    margin-bottom: 20px;
}

.logo-img img {
    max-width: 150px;
}

.form-label {
    font-weight: bold;
    color: #ffffff;
    position: absolute;
    top: 50%;
    background: #2e2e2e !important;
    left: 15px;
    font-size: 14px;
    transition: all 0.3s ease;
    transform: translateY(-50%);
    pointer-events: none;
    padding: 0 5px;
}

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-control {
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 16px;
    background: #2e2e2e;
    border: 1px solid #444;
    color: #ffffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
}

.form-control:focus {
    transform: scale(1.02);
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
    background: #1e1e1e !important;
    color: #ffffff !important;
}

.form-control:focus+.form-label,
.form-control:not(:placeholder-shown)+.form-label {
    top: -10px;
    left: 10px;
    font-size: 12px;
    color: #007bff;
    background: #1e1e1e !important;
    transform: translateY(0);
}

.form-control::placeholder {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
    /* Menambahkan transisi */
}

.form-control:focus::placeholder {
    visibility: visible;
    opacity: 1;
    color: #999 !important;
    font-size: 16px;
    transition: opacity 0.3s ease, visibility 0s 0s;
    /* Transisi saat fokus */
}

.btn-primary {
    background: #007bff;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
    color: #ffffff;
}

.btn-primary:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.text-center p {
    color: white !important;
    margin-bottom: 20px;
    font-size: 14px;
}

.text-primary {
    color: #007bff;
    cursor: pointer;
    text-decoration: none;
}

.text-primary:hover {
    text-decoration: underline;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-bottom: 10px;
}

.forgot-password {
    color: #007bff;
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}

.show-password {
    display: flex;
    align-items: center;
    color: #ffffff;
}

.show-password input {
    margin-right: 5px;
}

.is-invalid {
    border: 2px solid red;
    background-color: #1e1e1e;
}

.is-invalid-label {
    color: red !important;
    font-weight: bold !important;
}

.is-warning {
    border: 2px solid yellow;
    background-color: #1e1e1e;
}

.is-warning-label {
    color: yellow !important;
    font-weight: bold !important;
}

/* Styling untuk pesan error */
.error-message {
    color: red !important;
    font-size: 12px;
    margin-top: 5px;
    display: block;
    opacity: 1;
    animation: fadeIn 0.3s forwards;
    -webkit-animation: fadeIn 0.3s forward;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ✅ Fix Overlay Menghalangi Input */
.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    /* ⬅️ Mencegah menghalangi input */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Saat Animasi Ditampilkan */
.success-overlay.show {
    display: flex;
    opacity: 1;
}

.success-message {
    background: #1e1e1e;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    color: #ffffff;
}

/* Checkmark Animation */
.checkmark {
    width: 60px;
    height: 60px;
    stroke: #00bcd4;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    animation: draw 0.5s ease-in-out forwards;
    -webkit-animation: draw 0.5s ease-in-out forwards;
}

.checkmark-circle {
    stroke: #00bcd4;
    stroke-width: 5;
    stroke-dasharray: 157;
    stroke-dashoffset: 157;
    animation: circle 0.6s ease-in-out forwards;
}

.checkmark-check {
    stroke-dasharray: 36;
    stroke-dashoffset: 36;
    animation: check 0.3s ease-in-out 0.6s forwards;
}

/* Keyframes */
@keyframes circle {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes check {
    to {
        stroke-dashoffset: 0;
    }
}

/* ✅ Animasi Text (Muncul Bersamaan dengan Checkmark) */
#user-info {
    margin-top: 10px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.6s ease, transform 0.3s ease;
}

/* Saat Animasi Ditampilkan */
.success-overlay.show #user-info {
    opacity: 1;
    transform: translateY(0);
}

/* ✅ Ukuran Font */
#user-name {
    font-size: 22px;
    color: #00bcd4;
}

#user-role {
    font-size: 18px;
    color: #ffffff;
    opacity: 0.8;
}

/* Toast Container */
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;

    /* Posisi tetap di tengah bawah layar */
    position: fixed;
    bottom: 20px;
    left: 50%;
    z-index: 1000 !important;
}

/* Animasi muncul */
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Ikon dalam Toast */
.toast-icon {
    font-size: 20px;
    animation: bounce 0.5s infinite;
    -webkit-animation: bounce 0.5s infinite;
}

/* Animasi Teks di dalam Toast */
.toast-text {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.5s ease-in-out 0.2s forwards;
}

button.btn-primary:disabled {
    cursor: not-allowed !important;
    pointer-events: auto !important;
    /* Aktifkan kembali pointer events */
}


/* Keyframes untuk efek fade-in dan slide-up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animasi Ikon */
@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.toast-verifikasi {
    pointer-events: auto !important;
}

.toast-content {
    width: 100%;
    max-width: 100%;
}

/* Toast Header */
.toast-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    justify-content: space-between;
    /* Supaya elemen tersebar */
    color: white !important;
}

/* Styling untuk tombol close */
.toast-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

.toast-close:hover {
    color: #ff5555;
    /* Warna merah saat hover */
}

/* Garis pemisah */
.toast-divider {
    width: 100%;
    height: 5px;
    background: #ffffff !important;
    opacity: 0.5;
    border: none;
    margin: 10px 0;
}


/* Toast Verifikasi (mandiri, tidak ikut class .toast) */
.toast-verifikasi {
    display: none;
    /* Awalnya tersembunyi */
    flex-direction: column;
    align-items: center;
    background: #444;
    color: white;
    padding: 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;

    /* Posisi tetap */
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000 !important;
    /* Pastikan lebih tinggi dari elemen lain */
    max-width: 90%;
    width: 320px;
}

/* Tampilkan toast saat dibutuhkan */
.toast-verifikasi.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Saat layar lebih besar dari 768px (Desktop) */
@media (min-width: 768px) {
    .toast-verifikasi {
        left: auto;
        right: 20px;
        transform: translateX(0);
        -webkit-transform: translateX(0);
        -moz-transform: translateX(0);
        -ms-transform: translateX(0);
        -o-transform: translateX(0);
    }
}

/* Untuk tampilan mobile (muncul di tengah bawah) */
@media (max-width: 575px) {
    .toast-verifikasi {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Media Queries untuk Responsif */
@media (max-width: 576px) {
    body {
        padding: 10px;
    }

    .card {
        padding: 20px;
        max-width: 100%;
    }

    .logo-img img {
        max-width: 120px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .btn-primary {
        font-size: 14px;
        padding: 12px 18px;
    }

    .text-center p {
        font-size: 12px;
    }

    .text-primary {
        font-size: 12px;
    }
}

@media (max-width: 400px) {
    .form-control {
        font-size: 14px;
        padding: 8px 12px;
    }

    .btn-primary {
        font-size: 14px;
        padding: 12px;
    }

    .logo-img img {
        max-width: 100px;
    }
}

.exit-button {
    position: absolute;
    top: 10px;
    right: 15px;
    text-decoration: none;
    color: white;
    font-size: 24px;
    font-weight: bold;
    background: transparent;
    border: none;
    cursor: pointer;
}

.exit-button:hover {
    color: #ff4d4d;
}