/* ========================================================================== */
/* login.css - Professional Login Page Styling                             */
/* ========================================================================== */
/* This stylesheet creates an attractive dual-panel login interface with     */
/* modern animations, responsive design, and Haier branding.                */
/* ========================================================================== */

/* ============================================================ */
/* ROOT VARIABLES & GLOBAL STYLES                             */
/* ============================================================ */

:root {
    /* Color Palette */
    --primary-color: #0052CC;
    /* Haier Blue */
    --primary-dark: #003d99;
    /* Dark Blue */
    --accent-color: #00D9FF;
    /* Cyan Accent */
    --success-color: #10B981;
    /* Green */
    --error-color: #EF4444;
    /* Red */
    --warning-color: #F59E0B;
    /* Orange */
    --gray-50: #F9FAFB;
    /* Very Light Gray */
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-900: #111827;
    /* Dark Gray */

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;

    /* Fonts */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
}

/* Reset default styles and apply custom fonts */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    font-family: var(--font-sans);
    background-color: var(--gray-900);
    color: var(--gray-700);
}

/* ============================================================ */
/* LOGIN CONTAINER & PANELS                                   */
/* ============================================================ */

.login-container {
    /* Flex layout for side-by-side panels */
    display: flex;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #0052CC 0%, #003d99 50%, #001f3f 100%);
    position: relative;
    overflow: hidden;
}

/* Individual login panel */
.login-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl);
    position: relative;
}

/* Left panel - branding and features */
.left-panel {
    background: linear-gradient(135deg, rgba(0, 82, 204, 0.9) 0%, rgba(0, 61, 153, 0.9) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Content wrapper for left panel */
.panel-content {
    max-width: 500px;
    animation: slideInLeft 0.8s ease-out;
}

/* Brand title */
.brand-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Brand subtitle */
.brand-subtitle {
    font-size: 16px;
    font-weight: 300;
    margin-bottom: var(--spacing-2xl);
    opacity: 0.9;
    letter-spacing: 0.5px;
}

/* Welcome message section */
.welcome-message {
    margin-bottom: var(--spacing-2xl);
    padding: var(--spacing-lg);
    background: rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--accent-color);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
}

.welcome-message h2 {
    font-size: 28px;
    margin-bottom: var(--spacing-md);
    font-weight: 600;
}

.welcome-message p {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.95;
}

/* Features list styling */
.features-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(8px);
}

.feature-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.feature-item p {
    font-size: 14px;
    line-height: 1.5;
}

/* ============================================================ */
/* LOGIN FORM STYLING                                          */
/* ============================================================ */

/* Right panel - login form */
.right-panel {
    background: var(--gray-50);
    flex-direction: column;
    justify-content: center;
}

/* Form container */
.form-container {
    width: 100%;
    max-width: 420px;
    animation: slideInRight 0.8s ease-out;
}

/* Form header */
.form-header {
    margin-bottom: var(--spacing-2xl);
    text-align: center;
}

/* Top logo/header on right panel */
.top-logo {
    text-align: right;
    margin-bottom: var(--spacing-md);
    padding-right: var(--spacing-lg);
}

.haier-logo {
    font-size: 48px;
    color: var(--primary-color);
    font-weight: 800;
    letter-spacing: 1px;
    margin: 0;
}

/* Prominent warning note similar to the original screenshot */
.warning-note {
    background-color: #fff0f0;
    color: #b91c1c;
    border-left: 4px solid #b91c1c;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: var(--spacing-lg);
    font-size: 13px;
}

.form-header h2 {
    font-size: 32px;
    color: var(--gray-900);
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

.form-header p {
    color: var(--gray-600);
    font-size: 14px;
}

/* Form group (contains label, input, hint) */
.form-group {
    margin-bottom: var(--spacing-lg);
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--spacing-sm);
    display: block;
}

/* Input wrapper with icon support */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: var(--spacing-md);
    font-size: 18px;
    pointer-events: none;
    color: var(--gray-400);
}

/* Form input styling */
.form-input {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-md) 44px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: var(--font-sans);
    transition: all var(--transition-fast);
    background-color: white;
    color: var(--gray-900);
}

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

.form-input::placeholder {
    color: var(--gray-400);
}

/* Password toggle button */
.toggle-password {
    position: absolute;
    right: var(--spacing-md);
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: var(--spacing-sm);
    transition: opacity var(--transition-fast);
}

.toggle-password:hover {
    opacity: 0.7;
}

/* Input hint text (below input) */
.input-hint {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 4px;
}

/* Checkbox group styling */
.checkbox-group {
    flex-direction: row;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.form-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin-right: var(--spacing-md);
    accent-color: var(--primary-color);
}

.checkbox-label {
    font-size: 14px;
    color: var(--gray-600);
    cursor: pointer;
    margin: 0;
}

/* ============================================================ */
/* ALERTS (ERROR/SUCCESS MESSAGES)                             */
/* ============================================================ */

.alert {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    font-size: 14px;
    animation: slideDown 0.3s ease-out;
}

.alert-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.alert-text {
    flex: 1;
}

/* Error alert styling */
.alert-error {
    background-color: #FEE2E2;
    border-left: 4px solid var(--error-color);
    color: #991B1B;
}

/* Success alert styling */
.alert-success {
    background-color: #DCFCE7;
    border-left: 4px solid var(--success-color);
    color: #166534;
}

/* ============================================================ */
/* BUTTONS                                                     */
/* ============================================================ */

.btn-login {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 12px rgba(0, 82, 204, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.btn-login:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 82, 204, 0.4);
}

.btn-login:active:not(:disabled) {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Button loader animation */
.btn-loader {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Loader animation keyframes */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Secondary buttons (modal actions) */
.btn-secondary {
    padding: var(--spacing-md) var(--spacing-lg);
    background-color: var(--gray-200);
    color: var(--gray-700);
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background-color: var(--gray-300);
}

/* Primary buttons (modal actions) */
.btn-primary {
    padding: var(--spacing-md) var(--spacing-lg);
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

/* ============================================================ */
/* FORM FOOTER & LINKS                                         */
/* ============================================================ */

.form-footer {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--gray-200);
}

.form-footer p {
    font-size: 13px;
    color: var(--gray-600);
    margin: var(--spacing-md) 0;
}

/* Link styling */
a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ============================================================ */
/* DEMO HINT SECTION                                           */
/* ============================================================ */

.demo-hint {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-md) var(--spacing-lg);
    background-color: #FEF3C7;
    border-left: 4px solid var(--warning-color);
    border-radius: var(--radius-md);
    font-size: 12px;
    color: #92400E;
    animation: fadeIn 1s ease-out 0.5s both;
}

.demo-hint p {
    margin: 4px 0;
}

.demo-hint code {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

/* ============================================================ */
/* MODAL STYLING                                               */
/* ============================================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: var(--spacing-2xl);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 450px;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.modal-header h3 {
    font-size: 22px;
    color: var(--gray-900);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--gray-400);
    transition: color var(--transition-fast);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--gray-900);
}

.modal-buttons {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    justify-content: flex-end;
}

/* ============================================================ */
/* ANIMATIONS                                                  */
/* ============================================================ */

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

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

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

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ============================================================ */
/* RESPONSIVE DESIGN                                           */
/* ============================================================ */

/* Tablet and smaller screens */
@media (max-width: 1024px) {
    .login-container {
        flex-direction: column;
    }

    .left-panel {
        padding: var(--spacing-lg);
        min-height: 40vh;
    }

    .right-panel {
        min-height: 60vh;
        padding: var(--spacing-lg);
    }

    .brand-title {
        font-size: 36px;
    }

    .form-header h2 {
        font-size: 28px;
    }
}

/* Mobile screens */
@media (max-width: 640px) {
    :root {
        --spacing-md: 12px;
        --spacing-lg: 16px;
        --spacing-xl: 24px;
    }

    .login-container {
        padding: var(--spacing-md);
    }

    .left-panel {
        display: none;
    }

    .right-panel {
        min-height: 100vh;
        padding: var(--spacing-lg);
    }

    .form-container {
        max-width: 100%;
    }

    .brand-title {
        font-size: 28px;
    }

    .form-header h2 {
        font-size: 24px;
    }

    .form-input {
        padding: 12px 12px 12px 36px;
    }

    .modal-content {
        width: 95%;
        margin: 30% auto;
        padding: var(--spacing-lg);
    }
}

/* ============================================================ */
/* Overrides / new styles for the GSPL/Haier-style login page      */
/* These styles implement the two-column layout with a left      */
/* large image and a right-side login panel like the screenshot.  */
/* ============================================================ */

.login-wrapper {
    /* For centered layout the wrapper fills viewport and can show a background image */
    display: flex;
    min-height: 100vh;
    width: 100%;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

.hidden {
    display: none !important;
}

.left-column {
    flex: 1.1;
    background-size: cover;
    background-position: center center;
    position: relative;
    display: flex;
    align-items: center;
}

.left-overlay {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.65) 40%, rgba(255, 255, 255, 0.12) 100%);
    padding: 68px 80px;
    max-width: 720px;
}

.welcome-title {
    font-size: 36px;
    color: #0b3a7a;
    margin-bottom: 16px;
}

.welcome-text {
    color: #183a66;
    line-height: 1.6;
    font-size: 15px;
}

.center-box {
    width: 460px;
    max-width: calc(100% - 48px);
    text-align: center;
    padding: 40px 36px;
    background: rgba(225, 228, 228, 0.95);
    /* pale panel */
    border-radius: 10px;
    box-shadow: 0 6px 30px rgba(2, 6, 23, 0.3);
}

.logo-area {
    margin-bottom: 28px;
}

.haier-logo-img {
    max-width: 150px;
    height: auto;
}

.login-form {
    background: transparent;
}

.input-field {
    margin-bottom: 18px;
}

.input-field label {
    display: block;
    /* IMPORTANT */
    margin-bottom: 6px;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    text-align: left;
}

.input-field input {
    width: 100%;
    padding: 12px 18px;
    border-radius: 28px;
    border: 1px solid #131b1c;
    background: white;
    font-size: 18px;
}


.warning-note {
    color: #c62828;
    background: transparent;
    margin: 8px 0 12px 0;
    font-size: 13px;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.form-options .remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #123e67;
}

.link-forgot {
    color: #123e67;
    text-decoration: none;
}

.btn-login {
    display: inline-block;
    padding: 16px 48px;
    background: #173b7a;
    color: #ffffff;
    border-radius: 28px;
    border: none;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
}

.login-footer {
    margin-top: 28px;
    font-size: 12px;
    color: #6e6e6e;
}

/* Responsive: stack columns */
@media (max-width: 900px) {
    .login-wrapper {
        flex-direction: column;
    }

    .left-column {
        display: none;
    }

    .right-column {
        flex: 1;
    }

    .right-inner {
        width: 92%;
        padding: 32px 20px;
    }
}