﻿/* ═══════════════════════════════════════════════════════════════
   LOGIN PAGE - ASHICO HOMEPAGE
   Trang đăng nhập hệ thống nội bộ
   Synced with homepage-internal.css styles
   Updated: 2026-01-27
   ═══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────
   1. CSS VARIABLES (Synced with Homepage)
   ───────────────────────────────────────────────────────────────── */
:root {
    --ashico-blue: #034ea2;
    --ashico-blue-dark: #023a7a;
    --ashico-blue-light: #0066cc;
    --ashico-blue-lighter: #0088ff;
    --ashico-red: #ec2028;
    --ashico-red-dark: #c41920;
    --ashico-red-light: #ff4d54;
    --ashico-gold: #d4af37;
    --login-green: #43a047;
    --login-green-dark: #1b5e20;
    --login-green-light: #81c784;
    --text-dark: #1a202c;
    --text-medium: #4a5568;
    --text-gray: #718096;
    --text-light: #999;
    --bg-light: #f7fafc;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 8px 25px rgba(0,0,0,0.12);
    --shadow-lg: 0 15px 40px rgba(0,0,0,0.15);
    --shadow-blue: 0 10px 30px rgba(3, 78, 162, 0.25);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─────────────────────────────────────────────────────────────────
   2. RESET & BASE
   ───────────────────────────────────────────────────────────────── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.login-page {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, var(--ashico-blue) 0%, var(--ashico-blue-dark) 50%, #011f4b 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Background decoration - synced with hero-banner */
body.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.05) 0%, transparent 40%),
        radial-gradient(circle at 60% 80%, rgba(236, 32, 40, 0.03) 0%, transparent 40%);
    animation: bgFloat 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(1%, 1%); }
}

/* ─────────────────────────────────────────────────────────────────
   3. LOGIN CONTAINER
   ───────────────────────────────────────────────────────────────── */
.login-container {
    width: 100%;
    max-width: 950px;
    display: flex;
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    animation: loginFadeIn 0.8s ease-out;
    position: relative;
    z-index: 1;
}

@keyframes loginFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─────────────────────────────────────────────────────────────────
   4. LEFT SIDE - IMAGE & BRANDING (Synced with Hero Banner)
   ───────────────────────────────────────────────────────────────── */
.login-image {
    flex: 1;
    background: linear-gradient(135deg, var(--ashico-blue) 0%, var(--ashico-blue-dark) 50%, #011f4b 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 40px;
    position: relative;
    overflow: hidden;
}

/* Background decoration */
.login-image::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 30% 70%, rgba(255,255,255,0.05) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(236, 32, 40, 0.05) 0%, transparent 40%);
    animation: loginPulse 6s ease-in-out infinite;
}

/* Decorative circle - synced with hero-banner */
.login-image::after {
    content: '';
    position: absolute;
    bottom: -100px;
    right: -100px;
    width: 250px;
    height: 250px;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 50%;
}

@keyframes loginPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.3;
    }
}

.login-image__logo {
    max-width: 180px;
    z-index: 1;
    filter: brightness(0) invert(1);
    margin-bottom: 25px;
}

/* ASHICO Logo Text - Synced with Hero Banner */
.login-image__logo-text {
    font-family: 'Exo 2', 'Roboto', sans-serif;
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: 6px;
    z-index: 1;
    margin-bottom: 15px;
}

.login-image__logo-text .text-red {
    color: var(--ashico-red);
    text-shadow: 
        -1px -1px 0 white,
        1px -1px 0 white,
        -1px 1px 0 white,
        1px 1px 0 white,
        0 0 10px rgba(236, 32, 40, 0.5);
}

.login-image__logo-text .text-blue {
    color: var(--ashico-blue-light);
    text-shadow: 
        -1px -1px 0 white,
        1px -1px 0 white,
        -1px 1px 0 white,
        1px 1px 0 white,
        0 0 10px rgba(3, 78, 162, 0.4);
}

/* Divider - Synced with Hero Banner */
.login-image__divider {
    max-width: 200px;
    width: 100%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 1;
}

.login-image__divider-line:first-child {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--ashico-blue-light), rgba(255,255,255,0.8));
    border-radius: 2px;
}

.login-image__divider-line:last-child {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), var(--ashico-red), transparent);
    border-radius: 2px;
}

.login-image__divider-dot {
    width: 10px;
    height: 10px;
    background: var(--ashico-red);
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(236, 32, 40, 0.5);
    flex-shrink: 0;
}

/* Title & Subtitle */
.login-image__title {
    color: #fff;
    font-family: 'Exo 2', 'Roboto', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    text-align: center;
    z-index: 1;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 15px;
    opacity: 0.85;
}

/* Badge - Synced with hero-banner__subtitle */
.login-image__badge {
    font-family: 'Roboto', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--ashico-red), var(--ashico-red-dark));
    padding: 8px 24px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(236, 32, 40, 0.35);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.login-image__badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shine 4s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

.login-image__badge i {
    font-size: 0.75rem;
}

/* ─────────────────────────────────────────────────────────────────
   5. RIGHT SIDE - FORM CONTENT
   ───────────────────────────────────────────────────────────────── */
.login-content {
    flex: 1;
    padding: 50px 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Mobile Logo */
.login-logo-mobile {
    display: none;
    text-align: center;
    margin-bottom: 25px;
}

.login-logo-mobile__text {
    font-family: 'Exo 2', 'Roboto', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 4px;
}

.login-logo-mobile__text .text-red {
    color: var(--ashico-red);
}

.login-logo-mobile__text .text-blue {
    color: var(--ashico-blue);
}

.login-logo-mobile img {
    max-width: 150px;
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-family: 'Exo 2', 'Roboto', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--ashico-blue);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* ─────────────────────────────────────────────────────────────────
   6. ERP INFO BOX
   ───────────────────────────────────────────────────────────────── */
.erp-info {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border: 1px solid var(--login-green-light);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-sm);
}

.erp-info i {
    font-size: 28px;
    color: var(--login-green);
    flex-shrink: 0;
}

.erp-info .erp-text strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 3px;
    color: var(--login-green-dark);
    font-weight: 600;
}

.erp-info .erp-text span {
    font-size: 0.78rem;
    color: #558b2f;
    line-height: 1.4;
}

/* ─────────────────────────────────────────────────────────────────
   7. ERROR MESSAGE
   ───────────────────────────────────────────────────────────────── */
.error-message {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    color: #c62828;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid #c62828;
    animation: loginShake 0.5s ease;
    box-shadow: var(--shadow-sm);
}

.error-message i {
    font-size: 1.1rem;
}

@keyframes loginShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ─────────────────────────────────────────────────────────────────
   8. LOGIN FORM
   ───────────────────────────────────────────────────────────────── */
.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 22px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-group label i {
    margin-right: 6px;
    color: var(--ashico-blue);
}

.form-group .input-wrapper {
    position: relative;
}

.form-group .input-wrapper i.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ashico-blue);
    font-size: 1rem;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 15px 18px 15px 48px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--bg-light);
}

.form-group input:focus {
    border-color: var(--ashico-blue);
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(3, 78, 162, 0.1);
}

.form-group input::placeholder {
    color: var(--text-light);
}

/* Toggle Password */
.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
    padding: 5px;
}

.toggle-password:hover {
    color: var(--ashico-blue);
}

/* ─────────────────────────────────────────────────────────────────
   9. FORM OPTIONS
   ───────────────────────────────────────────────────────────────── */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 0.85rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-medium);
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--ashico-blue);
    cursor: pointer;
}

.forgot-password {
    color: var(--ashico-blue);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.forgot-password:hover {
    color: var(--ashico-red);
    text-decoration: underline;
}

/* ─────────────────────────────────────────────────────────────────
   10. LOGIN BUTTON
   ───────────────────────────────────────────────────────────────── */
.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--ashico-blue) 0%, var(--ashico-blue-dark) 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: var(--shadow-blue);
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--ashico-blue-dark) 0%, #011f4b 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(3, 78, 162, 0.4);
}

.btn-login:active {
    transform: translateY(-1px);
}

.btn-login:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-login i {
    margin-right: 10px;
}

/* ─────────────────────────────────────────────────────────────────
   11. FOOTER
   ───────────────────────────────────────────────────────────────── */
.login-footer {
    text-align: center;
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.login-footer p {
    color: var(--text-light);
    font-size: 0.75rem;
}

/* ─────────────────────────────────────────────────────────────────
   12. LOADING OVERLAY
   ───────────────────────────────────────────────────────────────── */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-overlay.show {
    display: flex;
}

.spinner {
    width: 55px;
    height: 55px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--ashico-blue);
    border-right: 4px solid var(--ashico-red);
    border-radius: 50%;
    animation: loginSpin 1s linear infinite;
}

@keyframes loginSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    margin-top: 18px;
    color: var(--ashico-blue);
    font-weight: 600;
    font-size: 0.95rem;
}

/* ─────────────────────────────────────────────────────────────────
   13. RESPONSIVE - TABLET
   ───────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        max-width: 450px;
    }

    .login-image {
        display: none;
    }

    .login-logo-mobile {
        display: block;
    }

    .login-content {
        padding: 40px 30px;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }
}

/* ─────────────────────────────────────────────────────────────────
   14. RESPONSIVE - MOBILE
   ───────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    body.login-page {
        padding: 12px;
    }

    .login-content {
        padding: 30px 22px;
    }

    .login-logo-mobile__text {
        font-size: 1.6rem;
        letter-spacing: 3px;
    }

    .login-header h1 {
        font-size: 1.3rem;
    }

    .login-header p {
        font-size: 0.8rem;
    }

    .form-options {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .erp-info {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 14px 16px;
    }

    .erp-info .erp-text strong {
        font-size: 0.85rem;
    }

    .erp-info .erp-text span {
        font-size: 0.72rem;
    }

    .btn-login {
        padding: 14px;
        font-size: 0.9rem;
        letter-spacing: 1px;
    }

    .form-group input[type="text"],
    .form-group input[type="password"] {
        padding: 13px 15px 13px 44px;
        font-size: 0.9rem;
    }
}