:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --error-gradient: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

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

/* Animated background effect */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.login-wrapper {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
    margin: 0 auto;
}

/* Login Card */
.login-card {
    background: white;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: none;
}

/* Card Header */
.login-header {
    background: var(--primary-gradient);
    color: white;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%);
    }

    20% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.login-header i {
    font-size: 4rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-radius: 50%;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.login-header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.login-header p {
    margin: 10px 0 0 0;
    opacity: 0.9;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

/* Card Body */
.login-body {
    padding: 35px 30px;
    background: #f8f9fa;
}

/* Error Alert */
.error-alert {
    background: var(--error-gradient);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 15px 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    box-shadow: 0 5px 20px rgba(220, 53, 69, 0.3);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.error-alert i {
    font-size: 1.3rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.form-label i {
    color: #667eea;
    font-size: 1.1rem;
}

/* Input Fields */
.input-group-custom {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: #667eea;
    font-size: 1.1rem;
    z-index: 10;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 12px 15px 12px 45px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    width: 100%;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
}

.form-control:hover {
    border-color: #764ba2;
}

/* Password field specific */
.password-input {
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 15px;
    color: #667eea;
    cursor: pointer;
    font-size: 1.1rem;
    z-index: 10;
    background: transparent;
    border: none;
}

.password-toggle:hover {
    color: #764ba2;
}

/* reCAPTCHA Container */
.recaptcha-container {
    margin: 25px 0;
    display: flex;
    justify-content: center;
    background: white;
    padding: 15px;
    border-radius: 15px;
    border: 2px solid #e9ecef;
}

/* Login Button */
.btn-login {
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 15px;
    padding: 14px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    color: white;
}

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

.btn-login i {
    font-size: 1.2rem;
}

/* Loading state */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    top: 50%;
    left: 50%;
    margin-left: -12px;
    margin-top: -12px;
    border: 3px solid white;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

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

/* Footer Links */
.login-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .login-header {
        padding: 30px 20px;
    }

    .login-header i {
        font-size: 3rem;
        padding: 15px;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }

    .login-body {
        padding: 25px 20px;
    }

    .recaptcha-container {
        transform: scale(0.9);
        margin: 15px -10px;
    }
}

/* Touch-friendly adjustments */
.btn-login,
.form-control,
.password-toggle {
    cursor: pointer;
}

.btn-login:active {
    transform: scale(0.98);
}

/* reCAPTCHA responsiveness */
@media (max-width: 350px) {
    .recaptcha-container {
        transform: scale(0.8);
        margin: 10px -20px;
    }
}

/* System status badge */
.system-badge {
    text-align: center;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

.system-badge i {
    margin-right: 5px;
}