/* Modern login page styles - Complete redesign */
body.login-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
    overflow: hidden;
}

.login-wrapper {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 320px;
    animation: slideUp 0.6s ease-out;
    height: auto;
    max-height: calc(100vh - 20px);
    display: flex;
    flex-direction: column;
    position: relative;
}

.language-selector {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

.language-selector select {
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 12px;
    padding: 5px 8px;
    min-width: 80px;
    backdrop-filter: blur(10px);
}

.language-selector select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    background: #ff0b17;
    padding: 20px 20px;
    text-align: center;
    position: relative;
    flex-shrink: 0;
}

.login-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="0.5" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="0.3" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.4" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.login-logo {
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.login-logo:hover {
    transform: scale(1.05);
}

.login-logo img {
    max-width: 48px;
    max-height: 48px;
    object-fit: contain;
    border-radius: 50%;
}

.brand-title {
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 6px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.brand-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    font-weight: 400;
    margin: 0;
    position: relative;
    z-index: 1;
}

.login-body {
    padding: 18px 20px;
    flex: 1;
    overflow: hidden;
}

.form-group {
    margin-bottom: 12px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 600;
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

.login-form-control {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 13px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #333;
    box-sizing: border-box;
}

.login-form-control:focus {
    outline: none;
    border-color: #ff0b17;
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 11, 23, 0.1);
    transform: translateY(-1px);
}

.login-form-control::placeholder {
    color: #9ca3af;
}

.form-check {
    display: flex;
    align-items: center;
    margin: 10px 0;
}

.form-check-input {
    margin-right: 10px;
    transform: scale(1.2);
    accent-color: #ff0b17;
}

.form-check-label {
    color: #666;
    font-size: 0.8rem;
    cursor: pointer;
}

.login-btn {
    width: 100%;
    padding: 8px;
    background: #ff0b17;
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 11, 23, 0.4);
    background: #e60a16;
}

.login-btn:active {
    transform: translateY(0);
}

.forgot-password {
    text-align: center;
    margin-top: 8px;
}

.forgot-password a {
    color: #ff0b17;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.forgot-password a:hover {
    color: #e60a16;
    text-decoration: underline;
}

.invalid-feedback {
    display: block;
    margin-top: 5px;
    color: #e74c3c;
    font-size: 0.85rem;
    font-weight: 500;
}

.login-form-control.is-invalid {
    border-color: #e74c3c;
    background: #fdf2f2;
}

/* Responsive design */
@media (max-width: 768px) {
    .login-container {
        padding: 5px;
        overflow: hidden;
    }
    
    .login-wrapper {
        max-width: 100%;
        border-radius: 15px;
        max-height: calc(100vh - 10px);
        height: auto;
        overflow: hidden;
    }
    
    .language-selector {
        top: 8px;
        right: 8px;
    }
    
    .language-selector select {
        font-size: 10px;
        padding: 3px 5px;
        min-width: 65px;
    }
    
    .login-header {
        padding: 12px 15px;
    }
    
    .login-logo {
        width: 55px;
        height: 55px;
        margin: 0 auto 8px;
    }
    
    .login-logo img {
        max-width: 35px;
        max-height: 35px;
    }
    
    .brand-title {
        font-size: 1rem;
        margin: 0 0 4px 0;
    }
    
    .brand-subtitle {
        font-size: 0.7rem;
    }
    
    .login-body {
        padding: 12px 15px;
        overflow: hidden;
    }
    
    .form-group {
        margin-bottom: 10px;
    }
    
    .form-label {
        font-size: 0.75rem;
        margin-bottom: 4px;
    }
    
    .login-form-control {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .login-btn {
        padding: 6px;
        font-size: 12px;
    }
    
    .form-check {
        margin: 8px 0;
    }
    
    .form-check-label {
        font-size: 0.75rem;
    }
    
    .forgot-password {
        margin-top: 6px;
    }
    
    .forgot-password a {
        font-size: 0.75rem;
    }
}

/* Loading animation */
.login-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.login-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
