﻿/* CSS Variables */
:root {
    --primary-green: #3F7B10;
    --primary-green-dark: #1e3d1a;
    --bg-white: #ffffff;
    --bg-light-gray: #f8f9fa;
    --bg-pattern: url('../../../Main/Images/2025/bg-pattern.png');
    --bg-gradient: radial-gradient(104.87% 104.87% at 52.85% 100%, #7AC142 0%, #132703 70.19%);
    --text-dark: #333;
    --text-gray: #666;
    --text-light-gray: #999;
    --border-light: #ddd;
    --border-focus: #3F7B10;
    --shadow-focus: rgba(63, 123, 16, 0.1);
    --gradient-text: linear-gradient(90deg, #A1D37A 0%, #FFFFFF 100%);
    --error-bg: #fef2f2;
    --error-border: #fecaca;
    --error-text: #dc2626;
    --error-icon: #ef4444;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Layout */
.container {
    display: flex;
    height: 100vh;
    padding: 1.2rem;
}

.login-section {
    flex: 0 0 50%;
    background: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.login-content {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    justify-content: space-between;
    padding: 2rem 0;
}

/* Client Logo */
.client-logo-container {
    text-align: center;
    margin: 0.5rem 0 1rem;
}

.client-logo {
    max-width: 200px;
    height: auto;
    max-height: 80px;
}

/* Login Form */
.login-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-title {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    text-align: center;
}

.login-subtitle {
    color: var(--text-gray);
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: normal;
}

.form {
    width: 100%;
}

/* Error Message */
.error-message {
    display: none;
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 1.5rem;
    align-items: flex-start;
    gap: 12px;
    animation: slideDown 0.3s ease-out;
}

.error-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--error-icon);
}

.error-title {
    font-weight: 600;
    color: var(--error-text);
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.error-description {
    color: var(--error-text);
    font-size: 0.8rem;
    line-height: 1.4;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.password-label-wrap {
    display: flex;
    justify-content: space-between;
}

.form-label {
    display: block;
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-align: left !important;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-light-gray);
    transition: all 0.3s ease;
}

    .form-input:focus {
        outline: none;
        border-color: var(--border-focus);
        background: var(--bg-white);
        box-shadow: 0 0 0 3px var(--shadow-focus);
    }

.password-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-gray);
    padding: 4px;
    display: flex;
    height: auto;
    width: fit-content !important;
}

    .password-toggle:hover {
        color: var(--primary-green);
    }

.eye-icon {
    width: 20px;
    height: 20px;
}

.forgot-password {
    color: var(--primary-green);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-block;
}

    .forgot-password:hover {
        text-decoration: underline;
    }

.signin-btn {
    width: 100%;
    background: var(--primary-green);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 1rem;
}

    .signin-btn:hover {
        background: var(--primary-green-dark);
    }

/* Version */
.version {
    text-align: center;
    color: var(--text-light-gray);
    font-size: 0.8rem;
    margin-top: 1rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .version::before,
    .version::after {
        content: '';
        flex: 1;
        height: 1px;
        background-color: var(--text-light-gray);
        margin: 0 10px;
    }

/* Footer */
.login-footer {
    margin-top: auto;
    text-align: center;
}

.crystal-logo {
    margin-bottom: 0.25rem;
}

    .crystal-logo img {
        width: 100px;
    }

.tech-info {
    font-size: 0.6rem;
    color: var(--text-light-gray);
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

/* Preview Section */
.preview-section {
    flex: 1;
    background: var(--bg-pattern), var(--bg-gradient);
    background-size: auto, cover;
    background-position: center, center;
    background-repeat: repeat, no-repeat;
    padding: 3rem 3rem 0 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
}

.preview-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.preview-text-content {
    max-width: 480px;
}

.preview-logo {
    margin-bottom: 1.5rem;
    text-align: left;
}

.white-logo {
    max-width: 300px;
    height: auto;
    max-height: 60px;
    filter: brightness(0) invert(1);
}

.preview-tagline {
    font-weight: 600;
    font-size: 32px;
    line-height: 140%;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    text-align: left;
}

.insights-image {
    width: 100%;
    height: calc(100vh - 290px);
    object-fit: cover;
    object-position: top;
}

/* Responsive */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
        padding: 0;
        overflow: auto;
    }

    .login-section {
        flex: none;
        min-height: 100vh;
        padding: 1rem;
    }

    .preview-section {
        display: none;
    }

    .login-content {
        height: auto;
        padding: 1rem 0;
    }
}

@media (max-width: 480px) {
    .login-title {
        font-size: 1.6rem;
    }
}

/* Focus States */
.form-input:focus,
.form-input:active,
.form-input:focus-within {
    outline: none;
    border: 1px solid var(--border-focus);
    outline-offset: 2px;
}

.password-toggle:focus {
    outline: none;
    border: none;
}
