/* login.css */
@import 'colors.css';

/* Full screen container */
.login-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
}

/* LEFT SIDE: Image/Hero */
.login-image-side {
    flex: 1.2;
    position: relative;
    background: url('../../../assets/img/login-bg.png') no-repeat center center/cover;
    display: none;
    height: 100vh;
    position: sticky;
    top: 0;
}

.login-image-side {
    background-image: url('../../../assets/img/hero.jpg');
}

.login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(6, 26, 35, 0.8) 0%, rgba(2, 128, 144, 0.4) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    color: var(--white);
}

.login-overlay h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.login-overlay p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 500px;
    line-height: 1.6;
}

/* RIGHT SIDE: Form */
.login-form-side {
    flex: 0.8;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 4rem;
    background-color: var(--bg-color);
    position: relative;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: left;
    margin-bottom: 3rem;
}

.login-logo img {
    height: 60px;
    width: auto;
    margin-bottom: 1.5rem;
}

.login-title {
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 210, 214, 0.2);
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2em;
    cursor: pointer;
}

select.form-input option {
    background-color: var(--bg-color);
    color: var(--white);
    padding: 10px;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    cursor: pointer;
}

.checkbox-container input {
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
}

.forgot-link {
    color: var(--primary-color);
    font-weight: 600;
}

.forgot-link:hover {
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 16px;
    border-radius: 8px;
    background: var(--primary-color);
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 210, 214, 0.4);
    background: white;
}

.register-prompt {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.register-link {
    color: var(--white);
    font-weight: 600;
    margin-left: 5px;
}

.register-link:hover {
    color: var(--primary-color);
}

/* Back Link */
.back-home {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.back-home:hover {
    color: var(--white);
}

/* Responsive */
@media (min-width: 992px) {
    .login-image-side {
        display: block;
    }
}

@media (max-width: 768px) {
    .login-form-side {
        padding: 2rem;
    }
}

/* Utilities */
.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

/* Password Toggle */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .form-input {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--primary-color);
}

.toggle-password .eye-icon {
    pointer-events: none;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    display: none;
    animation: fadeIn 0.3s ease;
}

.alert-error {
    background-color: rgba(255, 68, 68, 0.15);
    color: #ff4444;
    border: 1px solid rgba(255, 68, 68, 0.3);
}

.alert-success {
    background-color: rgba(0, 200, 81, 0.15);
    color: #00c851;
    border: 1px solid rgba(0, 200, 81, 0.3);
}

.alert-info {
    background-color: rgba(51, 181, 229, 0.15);
    color: #33b5e5;
    border: 1px solid rgba(51, 181, 229, 0.3);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}