/* Стили для авторизации */
.auth-section {
    margin: 40px 0;
}

/* Стили для логотипа на странице авторизации */
.logo {
    font-size: 3.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0 0 40px 0;
    text-align: center;
    background: linear-gradient(135deg, #2c5530, #4a7c59);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 400px;
    margin: 0 auto;
}

.auth-container h2 {
    color: #2c5530;
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 600;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: #2c5530;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: #4a7c59;
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.1);
}

.auth-button {
    background: linear-gradient(135deg, #4a7c59, #5a8c69);
    color: rgb(255, 255, 255);
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.auth-button:hover {
    background: linear-gradient(135deg, #5a8c69, #6a9c79);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 124, 89, 0.3);
}

.auth-button:active {
    transform: translateY(0);
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
}

.back-link {
    color: #4a7c59;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #2c5530;
    text-decoration: underline;
}

/* Стили для сообщений */
.messages {
    margin-bottom: 20px;
}

.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
}

.message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Стили для кнопки входа в углу */
.login-section-corner {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
}

.login-button {
    display: inline-block;
    background: linear-gradient(135deg, #4a7c59, #5a8c69);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(74, 124, 89, 0.3);
}

.login-button:hover {
    background: linear-gradient(135deg, #5a8c69, #6a9c79);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(74, 124, 89, 0.4);
    color: white;
    text-decoration: none;
}

.login-button:active {
    transform: translateY(0);
}

/* Стили для информации о пользователе в углу */
.user-info-corner {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 300px;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.user-info-corner span {
    color: #2c5530;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#user-name {
    font-size: 14px;
    font-weight: 600;
}

#user-role {
    font-size: 12px;
    opacity: 0.8;
}

.logout-button {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.logout-button:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Адаптивность */
@media (max-width: 768px) {
    .auth-container {
        padding: 30px 20px;
        margin: 0 20px;
    }
    
    .login-section-corner {
        top: 15px;
        left: 15px;
    }
    
    .user-info-corner {
        top: 15px;
        left: 15px;
        max-width: 250px;
        padding: 10px 12px;
    }
    
    .login-button {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .user-details {
        gap: 1px;
    }
    
    #user-name {
        font-size: 13px;
    }
    
    #user-role {
        font-size: 11px;
    }
    
    .logout-button {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .nav-buttons {
        margin: 0 20px;
    }
}

@media (max-width: 480px) {
    .login-section-corner {
        top: 10px;
        left: 10px;
    }
    
    .user-info-corner {
        top: 10px;
        left: 10px;
        max-width: 200px;
        padding: 8px 10px;
        gap: 8px;
    }
    
    .login-button {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .user-details {
        min-width: 0;
    }
    
    #user-name {
        font-size: 12px;
    }
    
    #user-role {
        font-size: 10px;
    }
    
    .logout-button {
        padding: 4px 8px;
        font-size: 10px;
    }
}
