﻿/* CloudTracking - Login Page Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

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

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --error-color: #ef4444;
    --text-dark: #1f2937;
    --text-medium: #6b7280;
    --text-light: #9ca3af;
    --bg-light: #f9fafb;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--primary-gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: -50%; right: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
    z-index: 0;
}

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

.login-container {
    position: relative; z-index: 1;
    width: 100%; max-width: 1100px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.login-illustration {
    background: var(--primary-gradient);
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.login-illustration::before {
    content: '';
    position: absolute;
    top: -100px; left: -100px;
    width: 300px; height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    filter: blur(60px);
}

.illustration-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.illustration-image {
    max-width: 100%;
    margin-bottom: 30px;
    animation: float 3s ease-in-out infinite;
}

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

.illustration-text h2 {
    color: white;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
}

.illustration-text p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    line-height: 1.6;
}

.login-form-section {
    padding: 60px 50px;
    background: white;
}

.logo-container {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    max-width: 180px;
    margin-bottom: 16px;
}

.welcome-text h1 {
    color: var(--text-dark);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.welcome-text p {
    color: var(--text-medium);
    font-size: 16px;
}

.login-form {
    margin-top: 40px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    padding-right: 48px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    color: var(--text-dark);
    background: var(--bg-light);
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-input.error {
    border-color: var(--error-color);
}

.input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s ease;
}

.input-icon:hover {
    color: var(--text-medium);
}

.error-message {
    color: var(--error-color);
    font-size: 13px;
    margin-top: 6px;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

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

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.remember-me label {
    color: var(--text-medium);
    font-size: 14px;
    cursor: pointer;
}

.forgot-password {
    color: #667eea;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #764ba2;
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 16px 24px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 16px; height: 16px;
    top: 50%; left: 50%;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

.messages {
    margin-bottom: 24px;
}

.alert {
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 16px;
    animation: slideDown 0.4s ease;
}

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

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

@media (max-width: 968px) {
    .login-content { grid-template-columns: 1fr; }
    .login-illustration { padding: 40px 30px; }
    .illustration-image { max-width: 300px; }
    .login-form-section { padding: 40px 30px; }
}

@media (max-width: 480px) {
    .login-container { border-radius: 16px; }
    .login-illustration { padding: 30px 20px; }
    .illustration-image { max-width: 240px; }
    .illustration-text h2 { font-size: 22px; }
    .login-form-section { padding: 30px 20px; }
    .welcome-text h1 { font-size: 26px; }
    .form-options { flex-direction: column; align-items: flex-start; gap: 12px; }
}
