* {
    box-sizing: border-box;
    font-family: "Segoe UI", Tahoma, sans-serif;
}

body {
    margin: 0;
    height: 100vh;
    background: linear-gradient(135deg, #8b0000, #b22222);
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: #ffffff;
    width: 360px;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    text-align: center;
}

.login-card h2 {
    margin-bottom: 5px;
    color: #8b0000;
}

.subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
}

.form-group {
    text-align: left;
    margin-bottom: 18px;
}

.form-group label {
    font-size: 13px;
    color: #444;
    display: block;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 14px;
    transition: 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #8b0000;
    box-shadow: 0 0 0 2px rgba(139,0,0,0.15);
}

.btn-login {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #8b0000, #b00000);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-login:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.error {
    background: #ffe5e5;
    color: #b00000;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 15px;
}

.footer-text {
    font-size: 12px;
    color: #999;
    margin-top: 20px;
}
/* ALERT MODERN */
#alertBox {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999;
}

.alert {
    min-width: 250px;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    color: white;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.4s ease;
}

/* SUCCESS */
.alert.success {
    background: linear-gradient(135deg, #28a745, #218838);
}

/* ERROR */
.alert.error {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

/* CLOSE BUTTON */
.alert button {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

/* ANIMATION */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    text-align: center;
    animation: fadeIn 0.4s ease;
}

/* sukses */
.alert.success {
    background-color: #d4edda;
    color: #155724;
}

/* error */
.alert.danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* animasi */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999;
}

.alert {
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 10px;
    color: white;
    font-weight: 500;
    animation: fadeIn 0.5s ease;
}

.alert.success {
    background: #28a745;
}

.alert.error {
    background: #dc3545;
}
.login-link a {
            color: #8b0000;
            text-decoration: none;
            font-weight: bold;
}
.login-link a:hover {
            text-decoration: underline;
        }
/* ================= LOGO DI LOGIN & REGISTER ================= */
.auth-logo {
    width: 80px; 
    height: auto;
    display: block; 
    margin: 0 auto 15px auto; 
    filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.15)); 
}

/* --- DESAIN KHUSUS CAPTCHA --- */
.captcha-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.captcha-img {
    border-radius: 4px;
    border: 1px solid #ccc;
    height: 50px;
}

.btn-refresh {
    padding: 10px;
    cursor: pointer;
    border-radius: 4px;
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-refresh:hover {
    background-color: #e5e7eb;
}

/* Membuat wadah input menjadi patokan koordinat (relative) */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

/* Memastikan teks panjang tidak menabrak ikon mata di kanan */
.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
    width: 100%;
    padding-right: 10px; /* Ruang aman di sebelah kanan */
}

/* Memposisikan ikon mata tepat di dalam kotak input sebelah kanan */
#ikonMata {
    position: absolute;
    right: 15px;
    cursor: pointer;
    color: #64748b;
    font-size: 16px;
    z-index: 10; /* Menjaga agar ikon tetap berada di lapisan atas */
    transition: color 0.2s ease;
}

/* Efek opsional saat ikon mata diarahkan kursor (hover) */
#ikonMata:hover {
    color: #a50000; /* Berubah warna khas dinas saat disorot */
}