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

:root {
    --primary-color: #DC2626;
    --primary-dark: #B91C1C;
    --primary-light: #EF4444;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --border-color: #DC2626;
    --background: #F1F5F9;
    --card-background: #FFFFFF;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    top: -100px;
    left: -100px;
    animation: float 20s ease-in-out infinite;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: var(--primary-light);
    top: 60%;
    right: -50px;
    animation: float 15s ease-in-out infinite reverse;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: var(--primary-dark);
    bottom: -50px;
    left: 20%;
    animation: float 18s ease-in-out infinite;
    animation-delay: -5s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    background: var(--primary-color);
    top: 20%;
    right: 15%;
    animation: float 12s ease-in-out infinite;
    animation-delay: -8s;
}

.shape-5 {
    width: 80px;
    height: 80px;
    background: var(--primary-light);
    bottom: 30%;
    right: 5%;
    animation: float 10s ease-in-out infinite reverse;
    animation-delay: -3s;
}

.shape-6 {
    width: 120px;
    height: 120px;
    background: var(--primary-dark);
    top: 40%;
    left: 10%;
    animation: float 16s ease-in-out infinite;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
    }
    25% {
        transform: translateY(-30px) translateX(20px) scale(1.05);
    }
    50% {
        transform: translateY(-60px) translateX(-20px) scale(0.95);
    }
    75% {
        transform: translateY(-30px) translateX(30px) scale(1.05);
    }
}

.login-container {
    width: 100%;
    max-width: 580px;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.login-card {
    background: var(--card-background);
    padding: 4rem 3.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    position: relative;
    backdrop-filter: blur(10px);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo {
    height: 170px;
    width: auto;
    margin-bottom: 2rem;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1.25rem;
    color: var(--text-secondary);
    pointer-events: none;
    width: 22px;
    height: 22px;
}

.input-wrapper input {
    width: 100%;
    padding: 1rem 1.25rem 1rem 3.25rem;
    border: 2px solid var(--border-color);
    background: var(--card-background);
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.3s;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.input-wrapper input::placeholder {
    color: var(--text-secondary);
}

.toggle-password {
    position: absolute;
    right: 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.toggle-password svg {
    width: 22px;
    height: 22px;
}

.toggle-password:hover {
    color: var(--primary-color);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -0.5rem;
}

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

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-text {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.forgot-link {
    font-size: 0.875rem;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 1.125rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    font-size: 1.0625rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 0.5rem;
}

.btn-login:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.3);
}

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

.support-text {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.support-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.support-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
    .login-container {
        padding: 1rem;
    }

    .login-card {
        padding: 2rem 1.5rem;
    }

    .login-logo {
        height: 50px;
    }

    .login-title {
        font-size: 1.125rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.25rem;
    }

    .input-wrapper input {
        font-size: 0.875rem;
        padding: 0.75rem 1rem 0.75rem 2.75rem;
    }

    .input-icon {
        left: 0.75rem;
    }

    .toggle-password {
        right: 0.75rem;
    }
}

/* Loading state */
.btn-login.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin-left: 0.5rem;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

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

/* Error state */
.input-wrapper.error input {
    border-color: #EF4444;
}

.error-message {
    font-size: 0.75rem;
    color: #EF4444;
    margin-top: 0.25rem;
}

