﻿/* General Styles */
:root {
    --primary-color: #1a2670;
    --primary-dark: #2e59d9;
    --secondary-color: #f8f9fc;
    --text-color: #5a5c69;
    --light-gray: #d1d3e2;
    --white: #ffffff;
    --dark-gray: #858796;
    --success-color: #1cc88a;
    --error-color: #e74a3b;
    --apple-color: #000000;
    --google-color: #4285F4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: var(--white);
    color: var(--text-color);
    line-height: 1.2;
    overflow-x: hidden;
    height: 100vh;
}

/* Main Container */
.main-container {
    display: flex;
    height: 100vh;
    position: relative;
}

/* Left Side - Branding with Slant Effect */
.branding-section {
    width: 40%;
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0% 100%);
    z-index: 1;
}

.branding-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: -15%;
    bottom: 0;
    left: 0;
    background: var(--primary-dark);
    z-index: -1;
    transform: skewX(-15deg);
    transform-origin: top left;
}

.branding-content {
    position: relative;
    z-index: 2;
    text-align: left;
    margin-left: 2rem;
}

.branding-section h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
    line-height: 1.2;
}

.branding-section p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.branding-footer {
    position: absolute;
    bottom: 40px;
    left: 40px;
    display: flex;
    align-items: center;
}

.branding-footer img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
}

.branding-footer-text {
    display: flex;
    flex-direction: column;
}

.branding-footer-text strong {
    font-weight: 700;
    margin-bottom: 2px;
}

.branding-footer-text span {
    font-size: 0.875rem;
    opacity: 0.8;
}

.branding-image img {
    width: 350px !important;
    height: 350px !important;
    margin-left: 30px;
}

/* Right Side - Login Form */
.login-section {
    width: 55%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2.5rem;
    position: relative;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.logo-container {
    text-align: center;
    margin-bottom: 1.2rem;
}

.logo-container img {
    max-width: 80px;
    margin-bottom: 0.8rem;
}

.logo-container h3 {
    font-size: 1.25rem;
    color: var(--text-color);
    font-weight: 700;
}

/* Form Styles */
.auth-form {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.sepertor {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.sepertor span {
    background-color: var(--white);
    padding: 0 1rem;
    position: relative;
    z-index: 1;
    color: var(--dark-gray);
    font-size: 0.875rem;
}

.sepertor::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--light-gray);
    z-index: 0;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-label.required::after {
    content: ' *';
    color: var(--error-color);
}

.form-control {
    width: 100%;
    padding: 0.35rem 2rem 0.35rem 1rem; /* Extra padding-right for icon */
    font-size: 0.9375rem;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.15);
}

.mb-3 {
    margin-bottom: 1.5rem;
}

/* Password Toggle */
.input-group {
    position: relative;
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--dark-gray);
    background: none;
    border: none;
    padding: 5px;
    z-index: 10;
    border: 1px solid red; /* Debug: Remove in production */
}

.toggle-password i {
    font-size: 1rem;
}

/* Remember Me & Forgot Password */
.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.form-check-input {
    margin-right: 0.2rem;
    accent-color: var(--primary-color);
}

.form-check-label {
    font-size: 0.875rem;
    color: var(--text-color);
}

.forgot-password {
    font-size: 0.875rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 400;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Sign In Button */
button[type="submit"] {
    width: 100%;
    padding: 0.5rem;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 0.5rem;
}

button[type="submit"]:hover {
    background-color: var(--primary-dark);
}

/* Footer Links */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--dark-gray);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Error Messages */
.text-danger {
    color: var(--error-color);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

.alert-danger {
    color: var(--error-color);
    background-color: #f8d7da;
    border-color: #f5c6cb;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.35rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .main-container {
        flex-direction: column;
    }

    .branding-section {
        width: 100%;
        clip-path: none;
        padding: 1.5rem 1rem;
    }

    .branding-section::before {
        transform: none;
        right: 0;
    }

    .login-section {
        width: 100%;
        padding: 2rem;
    }

    .branding-footer {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 2rem;
    }

    .branding-image img {
        display: none;
    }
}

@media (max-width: 576px) {
    .auth-form {
        padding: 1.75rem;
    }

    .branding-section h1 {
        font-size: 2rem;
    }

    .branding-section h3 {
        font-size: 1.25rem;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form {
    animation: fadeIn 0.5s ease-out;
}