/* ===================================
   PILOT Login Page - Custom Styles
   =================================== */

/* Import Poppins Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* CSS Variables */
:root {
    --primary-color: #3265FF;
    --primary-hover: #0045FF;
    --primary-dark: #001A66;
    --primary-50: #A8BFFF;
    --primary-10: #E5EBFF;
    --error-color: #D42620;
    --error-text: #CC1A17;
    --error-10: #FAD7D6;
    --success-color: #1EB564;
    --contrast-100: #1C304A;
    --contrast-70: #5D6879;
    --contrast-60: #8B92A0;
    --contrast-50: #A5AAB5;
    --contrast-40: #BFC2CA;
    --white: #FFFFFF;
    --border-radius: 8px;
    --gray-50: #F4F5F7;
    --gray-200: #CFD2D8;
    --gray-300: #BFC2CA;
}

/* Reset for login page */
.login-body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    background-color: var(--white);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Login Container */
.login-container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* Left Side - Login Form */
.login-left {
    flex: 0.7;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 80px;
    background-color: var(--white);
    overflow-y: auto;
}

/* Logo Section */
.login-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 60px;
}

.login-logo .logo-image {
    width: 200px;
    height: auto;
    object-fit: contain;
}

/* Welcome Section */
.welcome-section {
    margin-bottom: 40px;
}

.welcome-title {
    font-size: 48px;
    font-weight: 600;
    background: linear-gradient(90deg, #3265FF 0%, #0230BA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--primary-color);
    margin: 0 0 8px 0;
    line-height: 1.2;
    filter: drop-shadow(0 4px 6px rgba(50, 101, 255, 0.2));
}

.welcome-subtitle {
    font-size: 48px;
    font-weight: 600;
    background: linear-gradient(90deg, #3265FF 0%, #0230BA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--primary-color);
    margin: 0 0 16px 0;
    line-height: 1.2;
    filter: drop-shadow(0 4px 6px rgba(50, 101, 255, 0.2));
}

.welcome-description {
    font-size: 16px;
    font-weight: 400;
    color: var(--contrast-100);
    margin: 0;
    line-height: 1.5;
}

/* Login Form */
.login-form {
    max-width: 700px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .input-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--contrast-100);
    margin-bottom: 8px;
}

.login-form .input-wrapper {
    position: relative;
}

.login-form .form-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--contrast-40);
    border-radius: var(--border-radius);
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s ease;
    color: var(--contrast-100);
    background-color: var(--white);
    box-sizing: border-box;
}

.login-form .form-input::placeholder {
    color: var(--contrast-50);
}

.login-form .form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-10);
}

.login-form .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--contrast-60);
    font-size: 16px;
    pointer-events: none;
    z-index: 1;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--contrast-60);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
    z-index: 1;
}

.password-toggle:hover {
    color: var(--contrast-100);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--contrast-40);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    position: relative;
}

.checkbox-custom:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-custom:checked::after {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-label {
    font-size: 14px;
    font-weight: 400;
    color: var(--contrast-100);
    cursor: pointer;
    margin: 0;
    user-select: none;
}

.forgot-password {
    font-size: 14px;
    font-weight: 400;
    color: var(--contrast-100);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: var(--primary-color);
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 14px 24px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(50, 101, 255, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login i {
    font-size: 18px;
}

/* Right Side - Illustration */
.login-right {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 40px;
    background: #eef4fe;
    position: relative;
}

/* Company Logos */
.company-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
    padding: 20px 0;
    margin-top: 20px;
}

.company-logo {
    height: 70px;
    width: auto;
    object-fit: contain;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.company-logo:hover {
    opacity: 1;
}

/* Illustration Container */
.illustration-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.illustration-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 100vh;
}

/* Error States */
.form-input.error {
    border-color: var(--error-color);
}

.form-input.error:focus {
    box-shadow: 0 0 0 3px var(--error-10);
}

.error-message {
    font-size: 12px;
    color: var(--error-text);
    margin-top: 4px;
    margin-bottom: 12px;
    display: block;
}

/* Alert Messages */
.alert {
    padding: 12px 16px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-danger {
    background-color: var(--error-10);
    color: var(--error-text);
    border: 1px solid var(--error-color);
}

.alert-success {
    background-color: #E6F7ED;
    color: #008A4A;
    border: 1px solid var(--success-color);
}

/* Loading State */
.btn-login.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid var(--white);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Styles */
@media (max-width: 991px) {
    .login-container {
        flex-direction: column;
    }

    .login-left {
        padding: 40px;
        flex: 1;
    }

    .login-right {
        display: none;
    }

    .welcome-title,
    .welcome-subtitle {
        font-size: 36px;
    }
}

@media (max-width: 767px) {
    .login-left {
        padding: 32px 24px;
    }

    .login-logo {
        margin-bottom: 40px;
    }

    .login-logo .logo-image {
        width: 150px;
    }

    .welcome-title,
    .welcome-subtitle {
        font-size: 28px;
    }

    .welcome-description {
        font-size: 14px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

@media (max-width: 575px) {
    .login-left {
        padding: 24px 20px;
    }

    .welcome-title,
    .welcome-subtitle {
        font-size: 24px;
    }
}
