/**
 * Login Page CSS - Canton Fair Experience
 */

/* ============= RESET ============= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0033A0 0%, #002080 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* ============= BACKGROUND ============= */
.login-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0033A0 0%, #002080 100%);
    z-index: 0;
}

.pattern-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -30px); }
}

/* ============= LOGIN CONTAINER ============= */
.login-container {
    position: relative;
    z-index: 1;
    display: flex;
    width: 90%;
    max-width: 1200px;
    min-height: 600px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* ============= LEFT SIDE - BRANDING ============= */
.login-branding {
    flex: 1;
    background: linear-gradient(135deg, #0033A0 0%, #002080 100%);
    color: white;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.brand-content {
    position: relative;
    z-index: 1;
}

.brand-logo {
    margin-bottom: 2rem;
}

.logo-icon {
    font-size: 4rem;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.brand-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 3rem;
    line-height: 1.6;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

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

.feature-item svg {
    flex-shrink: 0;
    stroke-width: 3;
}

.brand-footer {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0.8;
    font-size: 0.875rem;
}

/* ============= RIGHT SIDE - FORM ============= */
.login-form-container {
    flex: 1;
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.login-form-wrapper {
    width: 100%;
    max-width: 420px;
}

.mobile-logo {
    display: none;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0033A0;
}

.login-header {
    margin-bottom: 2rem;
}

.login-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #6B7280;
    font-size: 1rem;
}

/* ============= ALERTS ============= */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.alert-error {
    background: #FEF2F2;
    color: #EF4444;
    border: 1px solid #FEE2E2;
}

.alert svg {
    flex-shrink: 0;
}

/* ============= FORM ============= */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
}

.form-label svg {
    color: #0033A0;
}

.form-input {
    padding: 0.875rem 1rem;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: #F9FAFB;
}

.form-input:focus {
    outline: none;
    border-color: #0033A0;
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 51, 160, 0.1);
}

.form-input::placeholder {
    color: #9CA3AF;
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6B7280;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.password-toggle:hover {
    background: #F3F4F6;
    color: #0033A0;
}

/* ============= FORM FOOTER ============= */
.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0033A0;
}

.checkbox-text {
    font-size: 0.875rem;
    color: #6B7280;
}

.forgot-link {
    font-size: 0.875rem;
    color: #0033A0;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: #002080;
}

/* ============= BUTTON ============= */
.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #0033A0 0%, #002080 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(0, 51, 160, 0.4);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 51, 160, 0.5);
}

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

/* ============= LOGIN HELP ============= */
.login-help {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #E5E7EB;
}

.login-help > p {
    font-size: 0.875rem;
    color: #6B7280;
    margin-bottom: 1rem;
}

.default-credentials {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.credential-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.credential-label {
    color: #6B7280;
    font-weight: 500;
    min-width: 60px;
}

.credential-item code {
    background: white;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    border: 1px solid #E5E7EB;
    font-family: 'Courier New', monospace;
    color: #0033A0;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

.credential-item code:hover {
    background: #0033A0;
    color: white;
    border-color: #0033A0;
}

.help-text {
    font-size: 0.75rem;
    color: #F59E0B;
    font-weight: 500;
}

/* ============= TOAST ============= */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

.toast-success {
    border-left: 4px solid #10B981;
    color: #10B981;
}

.toast-error {
    border-left: 4px solid #EF4444;
    color: #EF4444;
}

.toast button {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9CA3AF;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============= RESPONSIVE ============= */
@media (max-width: 1024px) {
    .login-branding {
        display: none;
    }
    
    .mobile-logo {
        display: flex;
    }
    
    .login-container {
        max-width: 500px;
    }
}

@media (max-width: 640px) {
    .login-container {
        width: 95%;
        border-radius: 16px;
    }
    
    .login-form-container {
        padding: 2rem 1.5rem;
    }
    
    .login-header h2 {
        font-size: 1.5rem;
    }
    
    .brand-title {
        font-size: 2rem;
    }
    
    .toast-container {
        left: 1rem;
        right: 1rem;
    }
    
    .toast {
        min-width: auto;
    }
}