/**
 * VIA Login Page Styles
 * Professional authentication interface
 */

/* Login Page Layout */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
}

/* Login Card */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

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

/* Header */
.login-header {
    text-align: center;
    padding: 30px 30px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 0;
}

.login-logo-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0;
    letter-spacing: -0.5px;
}

/* Form Container */
.login-form-container {
    padding: 30px;
}

/* Form Controls */
.form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-control-lg {
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.form-control-lg:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.1);
    background-color: #fff;
    transform: translateY(-2px);
}

.form-control-lg.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.1);
}

.form-control-lg.is-valid {
    border-color: #198754;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.1);
}

/* Password Input Group */
.password-input-group {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.1);
}

/* Form Check */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.form-check-input {
    border-radius: 6px;
    border: 2px solid #dee2e6;
    margin-top: 2px;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
    transform: scale(1.1);
}

.form-check-label {
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    line-height: 1.4;
}

.form-text {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 4px;
}

/* Login Button */
.login-btn {
    border-radius: 12px;
    padding: 14px 24px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.4);
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
}

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

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

.login-btn-loading {
    display: none !important;
}

.login-btn.loading .login-btn-text {
    display: none !important;
}

.login-btn.loading .login-btn-loading {
    display: inline !important;
}

/* Footer */
.login-footer {
    padding: 20px 30px 30px;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background-color: rgba(248, 249, 250, 0.5);
}

.login-security-info {
    margin-bottom: 10px;
}

.login-links a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.login-links a:hover {
    color: #0d6efd !important;
}

/* Alert Styles */
.alert {
    border-radius: 12px;
    border: none;
    font-weight: 500;
    animation: fadeIn 0.3s ease-out;
}

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

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c2c7 100%);
    color: #721c24;
}

.alert-success {
    background: linear-gradient(135deg, #d1e7dd 0%, #badbcc 100%);
    color: #0f5132;
}

/* Background Animation */
.login-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none; /* Make background non-interactive */
}

.floating-shapes {
    position: relative;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Make shapes non-interactive */
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 20s infinite linear;
    opacity: 0.6;
    pointer-events: none; /* Make individual shapes non-interactive */
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 10%;
    animation-delay: -5s;
    animation-duration: 30s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    top: 40%;
    left: 80%;
    animation-delay: -10s;
    animation-duration: 20s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 20%;
    animation-delay: -15s;
    animation-duration: 35s;
}

.shape-5 {
    width: 90px;
    height: 90px;
    top: 10%;
    right: 30%;
    animation-delay: -20s;
    animation-duration: 28s;
}

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

/* Invalid Feedback */
.invalid-feedback {
    display: block;
    font-size: 0.85rem;
    color: #dc3545;
    font-weight: 500;
    margin-top: 6px;
    animation: shake 0.3s ease-in-out;
}

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

/* Responsive Design */
@media (max-width: 576px) {
    .login-page {
        padding: 15px;
    }
    
    .login-card {
        border-radius: 16px;
    }
    
    .login-header {
        padding: 25px 20px 15px;
    }
    
    .login-logo-img {
        width: 40px;
        height: 40px;
    }
    
    .login-title {
        font-size: 1.75rem;
    }
    
    .login-form-container {
        padding: 20px;
    }
    
    .login-footer {
        padding: 15px 20px 20px;
    }
    
    .form-control-lg {
        font-size: 0.95rem;
        padding: 10px 14px;
    }
    
    .login-btn {
        font-size: 1rem;
        padding: 12px 20px;
    }
    
    .shape {
        opacity: 0.4;
    }
    
    .shape-1 { width: 60px; height: 60px; }
    .shape-2 { width: 90px; height: 90px; }
    .shape-3 { width: 45px; height: 45px; }
    .shape-4 { width: 75px; height: 75px; }
    .shape-5 { width: 70px; height: 70px; }
}

@media (max-width: 400px) {
    .login-container {
        max-width: 100%;
    }
    
    .login-header {
        padding: 20px 15px 15px;
    }
    
    .login-logo-img {
        width: 36px;
        height: 36px;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .login-form-container {
        padding: 15px;
    }
    
    .login-footer {
        padding: 15px;
    }
}

/* Focus states for accessibility */
.login-btn:focus,
.form-control-lg:focus,
.form-check-input:focus,
.password-toggle:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .login-card {
        background: #ffffff;
        border: 2px solid #000000;
    }
    
    .floating-shapes {
        display: none;
    }
    
    .login-page {
        background: #f8f9fa;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .login-card,
    .alert,
    .invalid-feedback {
        animation: none;
    }
    
    .floating-shapes {
        display: none;
    }
    
    .form-control-lg:focus,
    .login-btn:hover {
        transform: none;
    }
}