/* public/css/login.css */
:root {
    --primary-color: #c1121f; /* Red */
    --primary-dark: #9b0e18;
    --light-gray: #f8f9fb;
    --dark-gray: #0f172a;
    --border-color: #e5e7eb;
    --error-color: #d9534f;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--light-gray);
    color: var(--dark-gray);
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px; /* Add padding for small screens */
}

/* New wrapper for the entire login box */
.login-wrapper {
    display: flex;
    width: 100%;
    max-width: 900px; /* Max width for two columns */
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 18px 45px rgba(193, 18, 31, 0.12);
    overflow: hidden; /* To keep border-radius on child elements */
}

/* Left section for logo/brand */
.login-logo-section {
    flex-basis: 45%;
    background: radial-gradient(900px 500px at 20% 0%, rgba(193,18,31,.18), transparent 60%),
                linear-gradient(135deg, #c1121f, #9b0e18);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    text-align: center;
}

.login-logo-section .logo-image {
    width: 30%; /* Set logo width to 30% of its container */
    height: auto;
    margin-bottom: 20px;
}

.login-logo-section h1 {
    margin: 0;
    font-size: 36px;
    font-weight: 700;
}

.login-logo-section p {
    margin-top: 10px;
    font-size: 16px;
    opacity: 0.9;
}

/* Right section for the form */
.login-form-section {
    flex-basis: 55%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-container {
    background-color: transparent;
    padding: 40px;
    border-radius: 0;
    box-shadow: none;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-container h2 {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 28px;
    font-weight: 600;
}

.auth-container .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.password-container {
    position: relative;
    width: 100%;
}

.auth-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

/* Beri ruang di sebelah kanan input password untuk tombol */
.auth-container .password-container input[type="password"],
.auth-container .password-container input[type="text"] {
    padding-right: 55px;
}

.toggle-password-visibility {
    position: absolute;
    right: 10px;
    top: 0;
    bottom: 0;
    height: 100%;
    display: flex;
    align-items: center; /* Vertically center the text */
    cursor: pointer;
    color: #6c757d;
    font-weight: 500;
    font-size: 14px; /* Slightly smaller to fit nicely */
    user-select: none; /* Prevent text selection on double click */
    z-index: 2; /* Ensure the button is on top of the input field */
}

.auth-container input[type="text"],
.auth-container input[type="password"],
.auth-container select {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-sizing: border-box; /* Important */
}

.auth-container input:focus,
.auth-container select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(92, 133, 214, 0.25);
}

.auth-container button {
    width: 100%;
    padding: 14px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    background-color: var(--primary-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.auth-container button:hover {
    background-color: var(--primary-dark);
}

.auth-container .error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

.auth-container .switch-form {
    margin-top: 20px;
    font-size: 14px;
}

.auth-container .switch-form a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-container .switch-form a:hover {
    text-decoration: underline;
}

/* Responsive media query */
@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
        max-width: 450px;
    }

    .login-logo-section {
        padding: 30px 20px;
    }

    .auth-container {
        padding: 30px 20px;
    }
}
