:root {
    --primary-color: #ac2763;
    --secondary-color: #159fd7;
    --gradient-primary: linear-gradient(135deg, #ac2763, #d63384);
    --gradient-secondary: linear-gradient(135deg, #159fd7, #0dcaf0);
    --gradient-mixed: linear-gradient(135deg, #ac2763, #159fd7);
    --dark-color: #1e293b;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gradient-mixed);
    min-height: 100vh;
    overflow-x: hidden;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.background-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.floating-element {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(1) {
    width: 80px;
    height: 80px;
    background: var(--white);
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    width: 120px;
    height: 120px;
    background: var(--white);
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.floating-element:nth-child(3) {
    width: 60px;
    height: 60px;
    background: var(--white);
    bottom: 30%;
    left: 20%;
    animation-delay: 4s;
}

.floating-element:nth-child(4) {
    width: 100px;
    height: 100px;
    background: var(--white);
    top: 10%;
    right: 30%;
    animation-delay: 1s;
}

.floating-element:nth-child(5) {
    width: 140px;
    height: 140px;
    background: var(--white);
    bottom: 10%;
    right: 10%;
    animation-delay: 3s;
}

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

.login-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 10;
    transition: all 0.3s ease;
}

.login-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.brand-section {
    text-align: center;
    margin-bottom: 2.5rem;
}

.brand-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-mixed);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 20px rgba(172, 39, 99, 0.3);
    transition: all 0.3s ease;
}

.brand-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(172, 39, 99, 0.4);
}

.brand-icon i {
    font-size: 2.5rem;
    color: var(--white);
}

.brand-title {
    font-size: 2.2rem;
    font-weight: 700;
    background: var(--gradient-mixed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.brand-subtitle {
    color: #6b7280;
    font-size: 1rem;
    font-weight: 500;
}

.form-section {
    margin-bottom: 2rem;
}

.form-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    text-align: center;
}

.form-subtitle {
    color: #6b7280;
    text-align: center;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(172, 39, 99, 0.1);
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.input-group {
    position: relative;
}

.input-group-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    z-index: 5;
}

.input-group .form-control {
    padding-left: 2.75rem;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    z-index: 5;
    transition: color 0.3s ease;
}

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

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

.form-check {
    display: flex;
    align-items: center;
}

.form-check-input {
    margin-right: 0.5rem;
    accent-color: var(--primary-color);
}

.form-check-label {
    font-size: 0.9rem;
    color: var(--dark-color);
    cursor: pointer;
}

.forgot-password {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.btn-login {
    width: 100%;
    padding: 0.875rem;
    background: var(--gradient-mixed);
    border: none;
    border-radius: 12px;
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(172, 39, 99, 0.3);
}

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

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

.btn-loading {
    display: none;
    align-items: center;
    justify-content: center;
}

.btn-loading .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.footer-text {
    text-align: center;
    margin-top: 2rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.footer-text a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .login-card {
        margin: 1rem;
        padding: 2rem;
        border-radius: 16px;
    }

    .brand-title {
        font-size: 1.8rem;
    }

    .brand-icon {
        width: 70px;
        height: 70px;
    }

    .brand-icon i {
        font-size: 2rem;
    }

    .floating-element {
        opacity: 0.05;
    }

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

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

    .brand-title {
        font-size: 1.6rem;
    }
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(172, 39, 99, 0.3);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.brand-icon img {
    width: 100%;
    height: auto;
    max-height: 80px;
    object-fit: contain;
}