@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    --color-primary: #1e40af;
    --color-secondary: #dc2626;
    --color-bg-light: #f9fafb;
    --color-text-dark: #1f2937;
    --color-border: #d1d5db;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--color-text-dark);
    background-color: var(--color-bg-light);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.split-screen-wrapper {
    display: flex;
    width: 90%;
    max-width: 1200px;
    height: 80vh;
    min-height: 550px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: white;
}

.login-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.image-area {
    flex: 1.5;
    background: url('../img/bg.webp') no-repeat center center;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.login-content-box {
    width: 100%;
    max-width: 380px;
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.user-selection {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.user-selection button {
    flex: 1;
    padding: 1rem 0;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    background-color: white;
    color: var(--color-text-dark);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, transform 0.1s;
}

.user-selection button:hover {
    background-color: var(--color-bg-light);
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.login-form {
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.login-form h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.login-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #4b5563;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 1em;
    width: 100%;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-form input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.2);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.form-options a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.form-options a:hover {
    color: #1d4ed8;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: background-color 0.2s, transform 0.1s;
}

.back-btn {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background-color: transparent;
    color: var(--color-text-dark);
    font-weight: 500;
    cursor: pointer;
    margin-top: 0.75rem;
    transition: background-color 0.2s;
}

.back-btn:hover {
    background-color: #e5e7eb;
}

.admin-design {
    border: 2px solid var(--color-primary);
    background-color: rgba(30, 64, 175, 0.05);
}

.admin-design .submit-btn {
    background-color: var(--color-primary);
}

.admin-design .submit-btn:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
}

.superadmin-design {
    border: 2px solid var(--color-secondary);
    background-color: rgba(220, 38, 38, 0.05);
}

.superadmin-design .submit-btn {
    background-color: var(--color-secondary);
}

.superadmin-design .submit-btn:hover {
    background-color: #b91c1c;
    transform: translateY(-1px);
}

.password-container {
    position: relative; 
    width: 100%;
    margin-bottom: 1rem; 
}

.password-container input[type="password"],
.password-container input[type="text"] {
    width: 100%;
    margin-bottom: 0; 
    padding-left: 40px; 
    padding-right: 12px; 
}

.password-toggle {
    position: absolute;
    top: 50%; 
    left: 5px; 
    right: auto; 
    transform: translateY(-50%);
    
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    font-size: 1.2em;
    line-height: 1;
    color: #999;
    transition: color 0.2s;
    z-index: 10; 
}

.password-toggle:hover {
    color: var(--color-text-dark);
}

.form-error-box {
    margin-top: 15px;
    padding: 15px;
    border-left: 5px solid var(--color-secondary);
    background-color: #fef2f2;
    color: #991b1b;
    
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); 
}

.form-error-box strong {
    font-weight: 700;
    margin-right: 8px;
    color: var(--color-secondary);
}

@media (max-width: 900px) {
    .split-screen-wrapper {
        flex-direction: column;
        height: auto;
        width: 100%;
        max-width: 500px;
        min-height: auto;
        margin: 20px;
    }
    
    .image-area {
        display: none;
    }

    .login-area {
        padding: 1.5rem;
    }

    .login-content-box {
        max-width: 100%;
    }
}