:root {
    --primary-color: #800000;
    --primary-light: #9a1a1a;
    --secondary-color: #333333;
    --text-color: #1a1a1a;
    --bg-color: #eef2f6;
    --white: #ffffff;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}


body.login-page {
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 1100px;
    min-height: 80vh;
    /* Changed from fixed height to min-height */
    display: flex;
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* Left Visual Side */
.login-visual {
    flex: 1;
    /* Changed to equal flex for better balance */
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2c2c2c 50%, var(--primary-color) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 60px;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.login-visual::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../img/logo_icon.jpg') no-repeat center center;
    background-size: 150%;
    opacity: 0.05;
    transform: rotate(-10deg) scale(1.2);
}

.visual-header {
    z-index: 1;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
}

.visual-content {
    z-index: 1;
    margin-bottom: 40px;
}

.visual-content h1 {
    font-size: 3rem;
    /* Slightly reduced for better fit */
    line-height: 1.1;
    margin-bottom: 2rem;
    font-weight: 800;
}

.highlight-text {
    color: #ffcccc;
}

.visual-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.9;
    max-width: 90%;
}

.visual-footer {
    z-index: 1;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Right Form Side */
.login-form-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
    background: var(--white);
    position: relative;
    width: 100%;
    /* Ensure it takes full width when stacked */
}

.login-card {
    width: 100%;
    max-width: 400px;
}

.form-header {
    margin-bottom: 2rem;
    text-align: center;
}

.brand-logo-small {
    height: 50px;
    margin-bottom: 15px;
    object-fit: contain;
}

.form-header h2 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 8px;
}

.form-header p {
    color: var(--gray-500);
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: var(--gray-100);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(128, 0, 0, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-500);
    cursor: pointer;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(128, 0, 0, 0.3);
}

.btn-login:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(128, 0, 0, 0.4);
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
    .login-container {
        flex-direction: column;
        min-height: auto;
        height: auto;
        border-radius: 16px;
        margin: 20px 0;
    }

    .login-visual {
        padding: 40px;
        min-height: 250px;
        flex: 0 0 auto;
    }

    .visual-content h1 {
        font-size: 2.2rem;
    }

    .login-form-wrapper {
        padding: 40px 30px;
        flex: 1 1 auto;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
        align-items: flex-start;
        /* prevent centering issues on very small screens */
    }

    .login-container {
        border-radius: 12px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        margin: 0;
    }

    .login-visual {
        padding: 30px 20px;
        min-height: 200px;
    }

    .visual-content h1 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    .visual-content p {
        display: none;
        /* Hide description on mobile to save space */
    }

    .login-form-wrapper {
        padding: 30px 20px;
    }

    .form-header h2 {
        font-size: 1.5rem;
    }
}

/* Toast Notification Styles */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 300px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease forwards;
    position: relative;
    overflow: hidden;
    border-left: 4px solid var(--primary-color);
}

.toast.error {
    border-left-color: #dc2626;
}

.toast.success {
    border-left-color: #16a34a;
}

.toast-icon {
    font-size: 1.2rem;
}

.toast.error .toast-icon {
    color: #dc2626;
}

.toast.success .toast-icon {
    color: #16a34a;
}

.toast-message {
    font-size: 0.95rem;
    color: var(--text-color);
    flex: 1;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: rgba(0, 0, 0, 0.1);
    width: 100%;
}

.toast-progress-bar {
    height: 100%;
    background-color: currentColor;
    width: 100%;
    animation: progress 1.7s linear forwards;
}

.toast.error .toast-progress-bar {
    background-color: #dc2626;
}

.toast.success .toast-progress-bar {
    background-color: #16a34a;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes progress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}