/* login.css */

/* Reset default margin & padding */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Wrapper supaya logo bisa ditampilkan di luar card */
.login-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 420px;
}

/* Logo di luar card */
.login-logo {
    margin-bottom: 30px;
}

.login-logo img {
    max-width: 200px;
    height: auto;
    display: block;
}

/* Card Login */
.login-card {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    padding: 40px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    animation: fadeIn 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

.login-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Judul */
.login-card h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 24px;
}

.card-subtitle {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 400;
}

/* Form group dengan label */
.form-group {
    width: 100%;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 500;
}

/* Form input */
.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    height: 46px;
}

.form-control:focus {
    border-color: #328E6E;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(50, 142, 110, 0.25);
}

.input-group-text {
    background: transparent;
    border-right: none;
    border-radius: 8px 0 0 8px;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 8px 8px 0;
}

.input-group .form-control:focus {
    border-left: none;
    box-shadow: none;
}

.input-group:focus-within {
    box-shadow: 0 0 0 0.2rem rgba(50, 142, 110, 0.25);
    border-radius: 8px;
}

.input-group:focus-within .input-group-text,
.input-group:focus-within .form-control {
    border-color: #328E6E;
}

/* Tombol Login */
.btn-login {
    width: 100%;
    background: linear-gradient(90deg, #328E6E, #67AE6E);
    color: #fff;
    border: none;
    padding: 14px 0;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover {
    opacity: 0.9;
}

/* Error Message */
.error-message {
    color: #D84040;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
}

.alert {
    border-radius: 8px;
    font-size: 14px;
    padding: 12px 16px;
    margin-bottom: 20px;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-danger {
    background: linear-gradient(90deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

.alert-success {
    background: linear-gradient(90deg, #d4edda, #c3e6cb);
    color: #155724;
}

.footer-text {
    text-align: center;
    margin-top: 25px;
    font-size: 13px;
    color: #6c757d;
}

/* Animasi Fade In */
@keyframes fadeIn {
    from {opacity: 0; transform: translateY(-20px);}
    to {opacity: 1; transform: translateY(0);}
}

/* Responsive: lebih kecil di mobile */
@media (max-width: 400px) {
    .login-card {
        width: 95%;
        padding: 30px 20px;
    }
    .btn-login {
        font-size: 15px;
        padding: 12px 0;
    }
    .login-logo img {
        max-width: 120px;
    }
}